Update dependency python to v3.14.0 #90
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: CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| IMAGE_NAME: home | |
| jobs: | |
| format: | |
| name: Format | |
| runs-on: ubicloud-standard-2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Install formatters | |
| uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3 | |
| with: | |
| install: true | |
| cache: true | |
| install_args: "\"cargo:taplo-cli\" dprint" | |
| - name: Run formatters | |
| run: | | |
| mise format:ci | |
| lint: | |
| name: Lint | |
| runs-on: ubicloud-standard-2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Install linters | |
| uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3 | |
| with: | |
| install: true | |
| cache: true | |
| install_args: "\"cargo:taplo-cli\" \"npm:@infisical/cli\"" | |
| - name: Run linters | |
| run: | | |
| mise lint:ci --continue-on-error | |
| type-check: | |
| name: Type Check | |
| runs-on: ubicloud-standard-2 | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Run Fast Type Check | |
| run: mise typecheck:ty | |
| - name: Add .venv/bin to PATH | |
| run: echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| - name: Run Slow Type Check | |
| uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2 | |
| with: | |
| version: PATH | |
| project: ./pyrightconfig.json | |
| test: | |
| name: Test | |
| runs-on: ubicloud-standard-2 | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Run tests | |
| if: ${{ github.event_name == 'pull_request'}} | |
| run: | | |
| mise run test:ci | |
| - name: Create test summary | |
| uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| with: | |
| show: "all" | |
| paths: results/pytest-junit.xml | |
| output: pytest-summary.md | |
| if: ${{ github.event_name == 'pull_request' && !cancelled() }} | |
| - name: Wrap test summary in details | |
| if: ${{ github.event_name == 'pull_request' && !cancelled() }} | |
| run: | | |
| echo "<details>" > pytest-summary-wrapped.md | |
| echo "" >> pytest-summary-wrapped.md | |
| echo "<summary>Test Results</summary>" >> pytest-summary-wrapped.md | |
| echo "" >> pytest-summary-wrapped.md | |
| cat pytest-summary.md >> pytest-summary-wrapped.md | |
| echo "" >> pytest-summary-wrapped.md | |
| echo "</details>" >> pytest-summary-wrapped.md | |
| mv pytest-summary-wrapped.md pytest-summary.md | |
| - name: Update PR with test results | |
| uses: ./.github/actions/find-update-or-create-comment | |
| if: ${{ github.event_name == 'pull_request' && !cancelled() }} | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-includes: "Test Results" | |
| comment-author: "github-actions[bot]" | |
| body-path: pytest-summary.md | |
| edit-mode: replace | |
| - name: Run tests with coverage | |
| if: ${{ !cancelled() }} | |
| run: | | |
| mise run test:cov | |
| build: | |
| name: Build Docker Image | |
| runs-on: ubicloud-standard-2 | |
| needs: [test, lint, type-check, format] | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Determine branch name | |
| id: branch | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| echo "name=${{ github.head_ref }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "name=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=branch | |
| type=sha,prefix=${{ steps.branch.outputs.name }}-,format=short | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| deploy: | |
| name: Deploy to Fly.io | |
| runs-on: ubicloud-standard-2 | |
| needs: [build] | |
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Setup Fly.io CLI | |
| uses: superfly/flyctl-actions/setup-flyctl@63da3ecc5e2793b98a3f2519b3d75d4f4c11cec2 | |
| - name: Deploy to Fly.io | |
| run: flyctl deploy --remote-only | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |