Add typing and data-consistency checks when distributing/overloading … #68
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: PyTest | |
| on: push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: check out | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install MPI | |
| uses: mpi4py/setup-mpi@v1 | |
| with: | |
| mpi: mpich | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root --all-extras | |
| - name: Install library | |
| run: poetry install --no-interaction --all-extras | |
| - name: MyPy Type checking | |
| run: poetry run mypy --config-file mypy.ini --show-error-codes | |
| - name: Ruff Linting | |
| run: poetry run ruff check | |
| - name: Run MPI tests 2 ranks | |
| run: | | |
| mpirun -n 2 poetry run pytest --with-mpi | |
| - name: Run MPI tests 3 ranks | |
| run: | | |
| mpirun -n 3 poetry run pytest --with-mpi | |
| - name: Run MPI tests 4 ranks | |
| run: | | |
| mpirun -n 4 poetry run pytest --with-mpi | |
| - name: Run MPI tests 5 ranks | |
| run: | | |
| mpirun -n 5 poetry run pytest --with-mpi | |
| - name: Run MPI tests 6 ranks | |
| run: | | |
| mpirun -n 6 poetry run pytest --with-mpi | |
| - name: Run MPI tests 7 ranks | |
| run: | | |
| mpirun -n 7 poetry run pytest --with-mpi | |
| - name: Run MPI tests 8 ranks | |
| run: | | |
| mpirun -n 8 poetry run pytest --with-mpi | |
| - name: Run MPI tests 9 ranks | |
| run: | | |
| mpirun -n 9 poetry run pytest --with-mpi | |
| - name: Run MPI tests 16 ranks | |
| run: | | |
| mpirun -n 16 poetry run pytest --with-mpi |