Lock file maintenance #3264
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: Gating | |
| "on": | |
| pull_request: | |
| push: | |
| workflow_dispatch: | |
| inputs: {} | |
| jobs: | |
| tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Test with tox | |
| run: uvx --with tox-uv tox -e py3 | |
| - name: Collect coverage with Coveralls | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COVERALLS_FLAG_NAME: python-${{ matrix.python-version }} | |
| COVERALLS_PARALLEL: true | |
| run: | | |
| uvx --with coveralls coveralls --service=github | |
| - name: Upload coverage to Coveralls | |
| run: | | |
| uvx --with coveralls coveralls --finish --service=github | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| linters: | |
| name: Linters | |
| strategy: | |
| matrix: | |
| tox_env: | |
| - mypy | |
| - semgrep | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Test '${{ matrix.tox_env }}' with tox | |
| run: uvx --with tox-uv tox -e ${{ matrix.tox_env }} | |
| hadolint: | |
| name: Hadolint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| dockerfile: | |
| - Dockerfile | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5 # v3.3.0 | |
| with: | |
| dockerfile: ${{ matrix.dockerfile }} | |
| # Ignore list: | |
| # * DL3041 - Specify version with dnf install -y <package>-<version> | |
| ignore: DL3041 | |
| failure-threshold: warning | |
| image-build: | |
| name: Container Image Build | |
| needs: hadolint | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE_NAME: greenwave | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7 | |
| with: | |
| python-version: "3.13" | |
| enable-cache: true | |
| - name: Build Image | |
| id: build-image | |
| uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2 | |
| with: | |
| image: ${{ env.IMAGE_NAME }} | |
| tags: >- | |
| ${{ github.ref == 'refs/heads/master' && 'latest' || '' }} | |
| ${{ github.sha }} | |
| containerfiles: Dockerfile | |
| build-args: | | |
| SHORT_COMMIT=${{ github.sha }} | |
| COMMIT_TIMESTAMP=1 | |
| EXPIRES_AFTER=${{ github.ref == 'refs/heads/master' && 'never' || '30d' }} | |
| - name: Test Image | |
| env: | |
| GREENWAVE_LISTENERS: '0' | |
| SHORT_COMMIT: '${{ github.sha }}' | |
| COMMIT_TIMESTAMP: '1' | |
| run: | | |
| .github/run-functional-tests.sh "${{ steps.build-image.outputs.image }}:${{ github.sha }}" |