Testsuite #785
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: Testsuite | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| schedule: | |
| - cron: "30 5 * * *" # Run after metadata file update | |
| jobs: | |
| run_pytest: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.10", "3.13"] | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up virtual environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install requirements | |
| shell: bash -el {0} | |
| run: | | |
| conda activate fourcipp | |
| pip install -e .[dev,safe] | |
| - name: Run pytest | |
| shell: bash -el {0} | |
| run: | | |
| conda activate fourcipp | |
| pytest --color=yes -v --performance-tests --no-cov | |
| cat timings.md >> $GITHUB_STEP_SUMMARY | |
| run_pytest_with_4C: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/4c-multiphysics/4c:main | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up virtual environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| python-version: 3.13 | |
| - name: Install requirements | |
| shell: bash -el {0} | |
| run: | | |
| conda activate fourcipp | |
| pip install -e .[dev,safe] | |
| - name: Run pytest using 4C_docker_main config | |
| run: | | |
| fourcipp switch-config-profile 4C_docker_main | |
| pytest -n 4 --color=yes -v | |
| - name: Run pytest using default config | |
| # For this job coverage is turned off, otherwise the checks would fail. | |
| # Coverage is done in the 4C docker job, as here 4C test input files are available. | |
| run: | | |
| fourcipp switch-config-profile default | |
| pytest -n 4 --color=yes -v --no-cov |