feat(RELEASE-2460): add disk-image support to artifact helpers #3639
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: Python Checks for Pull Requests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| merge_group: | |
| types: [checks_requested] | |
| jobs: | |
| python: | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Install OS packages | |
| # libkrb5-dev is required for gssapi dependency installation (krb5-config command) | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get install -y libkrb5-dev | |
| curl -L https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64 \ | |
| -o /usr/local/bin/yq | |
| sudo chmod +x /usr/local/bin/yq | |
| - name: Check out repo | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Black Lint | |
| uses: psf/black@ce1897a8f20d0f64844dd666d07f4003500d0e09 # stable | |
| - name: Setup python environment for flake8 check | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: "3.12" # Same as in Dockerfile | |
| - name: flake8 Lint | |
| uses: py-actions/flake8@84ec6726560b6d5bd68f2a5bed83d62b52bb50ba # v2 | |
| - name: Run pytest with coverage | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| export PATH="$HOME/.local/bin:$PATH" | |
| uv sync --dev | |
| uv run pytest --cov=. --cov-report=xml:coverage.xml | |
| - name: Get changed Python files | |
| id: changed-files | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47 | |
| with: | |
| files: | | |
| **/*.py | |
| - name: docstring test | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| pip install ruff | |
| echo "Running ruff on changed Python files:" | |
| echo "${{ steps.changed-files.outputs.all_changed_files }}" | |
| ruff check --select D ${{ steps.changed-files.outputs.all_changed_files }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| flags: unit-tests | |
| files: coverage.xml | |
| fail_ci_if_error: false |