Broken FEEC projections on polar domains #587
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
| # This workflow will install Python dependencies and run tests with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Unit tests | |
| on: | |
| push: | |
| branches: [ devel, main ] | |
| paths: | |
| - 'psydac/**' | |
| - 'pyproject.toml' | |
| pull_request: | |
| branches: [ devel, main ] | |
| types: | |
| - ready_for_review | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-24.04, macos-14 ] | |
| python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ] | |
| isMerge: | |
| - ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} | |
| exclude: | |
| - { isMerge: false, python-version: '3.10', os: macos-14 } | |
| - { isMerge: false, python-version: '3.11', os: ubuntu-24.04 } | |
| - { isMerge: false, python-version: '3.12', os: macos-14 } | |
| - { isMerge: false, python-version: '3.13', os: ubuntu-24.04 } | |
| - { isMerge: false, python-version: '3.14', os: macos-14 } | |
| name: ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| env: | |
| OMP_NUM_THREADS: 2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: | | |
| pyproject.toml | |
| - name: Install non-Python dependencies on Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| uses: ./.github/actions/ubuntu_installations | |
| - name: Install non-Python dependencies on macOS | |
| if: matrix.os == 'macos-14' | |
| uses: ./.github/actions/macos_installations | |
| - name: Print information on MPI and HDF5 libraries | |
| run: | | |
| ompi_info | |
| h5pcc -showconfig -echo || true | |
| - name: Upgrade pip, setuptools, and wheel | |
| run: | | |
| pip install --upgrade pip setuptools wheel | |
| - name: Install PETSc and petsc4py with complex support | |
| uses: ./.github/actions/install_petsc4py | |
| - name: Install h5py in parallel mode | |
| uses: ./.github/actions/install_h5py | |
| - name: Install project | |
| run: | | |
| pip install .[test] | |
| pip freeze | |
| - name: Initialize test directory | |
| run: | | |
| mkdir scratch | |
| - name: Test Pyccel optimization flags | |
| working-directory: ./scratch | |
| run: >- | |
| cp $GITHUB_WORKSPACE/psydac/pytest.toml . && | |
| pytest --pyargs psydac -m pyccel --capture=no | |
| - name: Verify that 'psydac test' reports failures correctly | |
| working-directory: ./scratch | |
| # We run a test which is not collected by pytest by default, and we expect it to fail. | |
| # If it fails (non-zero), the "echo" runs and the script exits with 0 (success). | |
| # If it passes (zero), the "exit 1" runs and the GitHub Action fails. | |
| run: | | |
| psydac test --mod psydac.cmd.tests.failing_test && { echo "Test passed but should have failed!"; exit 1; } || echo "Test failed as expected." | |
| - name: Run coverage tests on macOS | |
| if: matrix.os == 'macos-14' | |
| working-directory: ./scratch | |
| run: >- | |
| cp $GITHUB_WORKSPACE/psydac/pytest.toml . && | |
| pytest -n auto | |
| --cov psydac | |
| --cov-report xml | |
| --pyargs psydac -m "not mpi and not petsc" -ra | |
| - name: Run single-process tests with Pytest on Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| working-directory: ./scratch | |
| run: | | |
| psydac test | |
| - name: Upload coverage report to Codacy | |
| if: matrix.os == 'macos-14' | |
| uses: codacy/codacy-coverage-reporter-action@v1.3.0 | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| coverage-reports: ./scratch/coverage.xml | |
| - name: Print detailed coverage results on macOS | |
| if: matrix.os == 'macos-14' | |
| working-directory: ./scratch | |
| run: | | |
| coverage report --ignore-errors --show-missing --sort=cover | |
| - name: Run MPI tests with Pytest | |
| working-directory: ./scratch | |
| run: | | |
| psydac test --mpi | |
| - name: Run single-process PETSc tests with Pytest | |
| working-directory: ./scratch | |
| run: | | |
| psydac test --petsc | |
| - name: Run MPI PETSc tests with Pytest | |
| working-directory: ./scratch | |
| run: | | |
| psydac test --mpi --petsc | |
| - name: Run single-process example tests with Pytest on Ubuntu | |
| if: matrix.os == 'ubuntu-24.04' | |
| working-directory: ./scratch | |
| run: >- | |
| cp $GITHUB_WORKSPACE/psydac/pytest.toml . && | |
| cp -r $GITHUB_WORKSPACE/examples . && | |
| python -m pytest examples/feec | |
| - name: Remove test directory | |
| if: always() | |
| run: | | |
| rm -rf scratch |