Bump the github-actions group with 6 updates (#636) #841
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 CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| release: | |
| types: [ released ] | |
| permissions: {} | |
| jobs: | |
| linting: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| python-version: "3.13" | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies | |
| run: uv sync --group dev --frozen | |
| - name: Run pre-commit | |
| run: uv run pre-commit run --all-files | |
| test-app: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Create Ganache network | |
| run: docker network create ganache | |
| - name: Setup and run ganache | |
| run: docker run --detach --publish 8545:8545 --network ganache -e DOCKER=true trufflesuite/ganache:latest --defaultBalanceEther 10000 --gasLimit 10000000 -a 30 --chain.chainId 1337 --chain.networkId 1337 -d | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies | |
| run: uv sync --group dev --all-extras --frozen | |
| - name: Run tests and coverage | |
| run: | | |
| uv run coverage run -m pytest -rxXs | |
| uv run coverage combine | |
| uv run coverage lcov -o coverage.lcov | |
| - name: Coveralls Parallel | |
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 | |
| with: | |
| file: coverage.lcov | |
| flag-name: run-${{ matrix.python-version }} | |
| parallel: true | |
| finish: | |
| permissions: | |
| contents: read | |
| needs: test-app | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 | |
| with: | |
| parallel-finished: true | |
| publish: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| needs: test-app | |
| if: github.event_name == 'release' && github.event.action == 'released' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| python-version: '3.13' | |
| - name: Deploy Package | |
| run: | | |
| uv build | |
| uv publish | |
| env: | |
| UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| docker-deploy: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| needs: test-app | |
| if: github.event_name == 'release' && github.event.action == 'released' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 | |
| with: | |
| platforms: arm64 | |
| - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - name: Dockerhub login | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| username: ${{ secrets.DOCKER_USER }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Deploy Tag | |
| uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: | | |
| safeglobal/safe-cli:${{ github.event.release.tag_name }} | |
| safeglobal/safe-cli:latest | |
| platforms: | | |
| linux/amd64 | |
| linux/arm64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |