diff --git a/.github/workflows/GitHub_tests.yml b/.github/workflows/GitHub_tests.yml new file mode 100644 index 0000000..a2e0fd4 --- /dev/null +++ b/.github/workflows/GitHub_tests.yml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dac48f..601c309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 5f7ae32..2c3e3bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" ] diff --git a/requirements.txt b/requirements.txt index fd15dee..db20612 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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