✨ Regrid eqdsk after read in #11244
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: bluemira_ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| jobs: | |
| linter: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: "Cache pre-commit" | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: "Install pre-commit" | |
| shell: bash -l {0} | |
| run: | | |
| pip install pre-commit | |
| pre-commit install | |
| - name: Check Code Quality | |
| shell: bash -l {0} | |
| run: | | |
| echo '```console' > "$GITHUB_STEP_SUMMARY" | |
| pre-commit run --all-files --show-diff-on-failure --color=always | \ | |
| tee >(sed -E 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[mGK]//g' >> "$GITHUB_STEP_SUMMARY") >&1 | |
| exit_code="${PIPESTATUS[0]}" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| exit "$exit_code" | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| uses: ./.github/workflows/actions/build | |
| with: | |
| python-version: "3.12" | |
| bm-private-data-key: ${{ secrets.BLUEMIRA_PRIVATE_DATA_DEPLOY_KEY }} | |
| - name: Test Documentation code snippets | |
| shell: bash -l {0} | |
| run: pytest bluemira documentation eudemo/eudemo | |
| - name: Build Documentation bluemira | |
| shell: bash -l {0} | |
| run: | | |
| sphinx-build -j auto -W documentation/source documentation/build | |
| test: | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ["3.11", "3.12"] | |
| with-process: ["v3.2.2", "process_disabled"] | |
| include: | |
| - os: "ubuntu-latest" | |
| python-version: "3.10" | |
| with-process: "process_disabled" | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| uses: ./.github/workflows/actions/build | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| bm-private-data-key: ${{ secrets.BLUEMIRA_PRIVATE_DATA_DEPLOY_KEY }} | |
| with-artifact: ${{ matrix.with-process == 'process_disabled' && 'true' || 'false' }} | |
| - name: Install PROCESS | |
| if: ${{ matrix.with-process != 'process_disabled' }} | |
| uses: ./.github/workflows/actions/process | |
| with: | |
| version: ${{ matrix.with-process }} | |
| - name: Run pytest bluemira | |
| shell: bash -l {0} | |
| env: | |
| # Flag to run longrun tests when merging dependency updates | |
| # https://github.com/actions/runner/issues/409#issuecomment-752775072 | |
| PYTEST_LONGRUN: ${{ github.event.pull_request.head.ref == 'develop_dependencies' && '--longrun' || '' }} | |
| PYTEST_PRIVATE: ${{ !github.event.pull_request.head.repo.fork && '--private' || '' }} | |
| run: | | |
| pytest --cov=bluemira \ | |
| --cov-report html:htmlcov_bluemira \ | |
| --cov-report xml \ | |
| --json-report \ | |
| --json-report-file=test-report.json \ | |
| --json-report-indent=2 \ | |
| --reactor \ | |
| ${PYTEST_PRIVATE} \ | |
| ${PYTEST_LONGRUN} \ | |
| tests eudemo/eudemo_tests | |
| - name: Upload test report | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ matrix.with-process != 'process_disabled' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: test-report-json_${{ matrix.python-version }}_${{ matrix.os }} | |
| path: test-report.json | |
| overwrite: true | |
| - name: "Upload coverage to Codecov" | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| fail_ci_if_error: ${{ github.ref_name == 'develop' || github.ref_name == 'main' }} |