Skip to content

Commit

Permalink
Merge pull request #163 from smash-transport/roch/GH_action_tests
Browse files Browse the repository at this point in the history
Automatic GH action for tests
  • Loading branch information
Hendrik1704 authored Dec 7, 2023
2 parents 604ebf3 + 55d5294 commit 2969c05
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/GitHub_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Tests

on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
- sparkx_devel

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python -m pytest tests/
- name: Check test results
run: |
if [ $? -ne 0 ]; then
echo "Tests failed. Blocking pull request merge."
exit 1
fi
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A `Deprecated` section could be added if needed for soon-to-be removed features.
* Lattice3D: Add covariant smearing of densities for particles
* Oscar: Add spacetime cut
* Particle: Add strangeness, spin and spin_degeneracy functions
* Tests: Add tests for the Particle class
* Tests: Add automatic tests for the Particle class
* GenerateFlow: Add functionality to generate flow with k-particle correlations
* LeeYangZeroFlow: Add beta version of integrated and differential flow analysis with the Lee-Yang zero method
* QCumulantFlow: Add beta version of integrated flow analysis with the Q-Cumulant method
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ dependencies = [
"numpy>=1.23.5",
"scipy>=1.10.1",
"abc-property==1.0",
"fastjet==3.4.1.3"
"fastjet==3.4.1.3",
"matplotlib>=3.7.1"
]


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ numpy>=1.23.5
scipy>=1.10.1
abc-property==1.0
fastjet==3.4.1.3
matplotlib>=3.7.1

sphinx==7.2.6
numpydoc==1.6.0
Expand Down

0 comments on commit 2969c05

Please sign in to comment.