Skip to content

Commit

Permalink
Add GH action to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik1704 committed Dec 6, 2023
1 parent 604ebf3 commit cdfbfc2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
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.8

- 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

0 comments on commit cdfbfc2

Please sign in to comment.