Precise conversions #961
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run tests | |
| on: | |
| schedule: | |
| - cron: '19 3 * * 1-5' | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| workflow_call: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout swiftsimio | |
| uses: actions/checkout@v6 | |
| - name: Run flake8 | |
| uses: py-actions/flake8@v2 | |
| - uses: astral-sh/ruff-action@v3 | |
| - name: Ruff style checks | |
| run: ruff check | |
| - name: Ruff formatting checks | |
| run: ruff format --check --diff | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install numpydoc | |
| run: pip install numpydoc | |
| - name: Run docstring validation | |
| run: python -m numpydoc lint **/*.py | |
| - name: Install sphinx-lint | |
| run: pip install sphinx-lint | |
| - name: Run sphinx-lint | |
| run: sphinx-lint --max-line-length 90 -e all docs/source/ | |
| - name: Install mypy | |
| run: pip install mypy | |
| - name: Install types | |
| run: mypy --install-types --non-interactive | |
| - name: Run mypy | |
| run: mypy | |
| tests: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout swiftgalaxy | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[all,testing] | |
| python -m pip install git+https://github.com/dnarayanan/caesar.git | |
| python -m pip install git+https://github.com/SWIFTSIM/soap.git | |
| - name: Test with pytest | |
| run: | | |
| pytest -n 2 | |
| tests-and-coverage: | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout swiftgalaxy | |
| uses: actions/checkout@v6 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.12 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[all,testing] | |
| python -m pip install git+https://github.com/SWIFTSIM/soap.git | |
| python -m pip install git+https://github.com/dnarayanan/caesar.git | |
| - name: Test with pytest including coverage report | |
| run: | | |
| pytest -n 2 --cov --cov-branch --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| windows-tests: | |
| needs: lint | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout swiftgalaxy | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[all,testing] | |
| python -m pip install git+https://github.com/SWIFTSIM/soap.git | |
| - name: Test with pytest | |
| run: | | |
| pytest -n 2 | |
| macos-tests: | |
| needs: lint | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout swiftgalaxy | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[all,testing] | |
| python -m pip install git+https://github.com/SWIFTSIM/soap.git | |
| python -m pip install git+https://github.com/dnarayanan/caesar.git | |
| - name: Test with pytest | |
| run: | | |
| pytest -n 2 |