Bump the uv group across 5 directories with 2 updates (#30) #533
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: ai4sim-ci-cd | |
| on: [push, pull_request] | |
| permissions: | |
| actions: write | |
| checks: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| run-checks: | |
| runs-on: ${{ vars.IMAGE_RUNNER }} | |
| strategy: | |
| matrix: | |
| model-project: | |
| - reactive-flows/cnf-combustion/gnns | |
| - reactive-flows/cnf-combustion/unets | |
| - weather-forecast/gravity-wave-drag/cnns | |
| - weather-forecast/ecrad-3d-correction/unets | |
| - weather-forecast/nwp-emulation/panguweather | |
| fail-fast: false | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| - name: Install nox build tool | |
| run: pip3 install nox$(grep nox.needs_version ${{ matrix.model-project }}/noxfile.py | sed -rn "s/.*\"([><=]=.*)\"/\1/p") | |
| - name: Install uv tool | |
| run: pip3 install uv | |
| - name: Analysing the code with flake8 | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s lint -v | |
| rm -rf .nox | |
| - name: Analysing the code with isort | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s import_sort -v -- check-only | |
| rm -rf .nox | |
| - name: Analysing the code with black | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s black -v -- check-only | |
| rm -rf .nox | |
| - name: Analysing the code with mypy | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s mypy | |
| rm -rf .nox | |
| - name: Run unit tests with coverage report | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s tests -v | |
| rm -rf .nox | |
| - name: Run functional tests | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s train_test -v -- clean_data | |
| rm -rf .nox | |
| - name: Combine coverage reports | |
| working-directory: ${{ matrix.model-project }} | |
| run: | | |
| nox -s coverage_report -R -v -- combine | |
| rm -rf .nox | |
| - name: Coverage Commentator | |
| uses: 5monkeys/cobertura-action@master | |
| with: | |
| path: ${{ matrix.model-project }}/.ci-reports/pycoverage.xml | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| minimum_coverage: 0 | |
| fail_below_threshold: false | |
| show_missing: true | |
| link_missing_lines: true | |
| link_missing_lines_source_dir: ${{ matrix.model-project }} | |
| report_name: Coverage report for ${{ matrix.model-project }} model project | |
| dependabot-auto-merge: | |
| runs-on: ubuntu-latest | |
| needs: run-checks | |
| if: ${{ (github.event.pull_request.user.login == 'dependabot[bot]') || (github.event.repository.name == 'model-collection' && github.event_name == 'pull_request') }} | |
| steps: | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.AI4SIM_APP_ID }} | |
| private-key: ${{ secrets.AI4SIM_APP_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Approve a PR by github-actions[bot] | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Enable auto-merge for Dependabot PRs | |
| run: gh pr merge --auto ${{ vars.MERGE_FLAG }} "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} |