name: Upgrade checks env: PY_COLORS: 1 on: push: branches: ["main"] paths: - "src/**" - "tests/**" - "uv.lock" - "pyproject.toml" - ".github/workflows/**" schedule: # Run daily at 2 AM UTC - cron: "0 2 * * *" workflow_dispatch: permissions: contents: read issues: write jobs: static_analysis: name: Static analysis timeout-minutes: 2 runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Setup uv (upgrade) uses: ./.github/actions/setup-uv with: resolution: upgrade - name: Run prek uses: j178/prek-action@v1 env: SKIP: no-commit-to-branch run_tests: name: "Tests: Python ${{ matrix.python-version }} on ${{ matrix.os }}" runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] python-version: ["3.10"] include: - os: ubuntu-latest python-version: "3.13" fail-fast: false timeout-minutes: 10 steps: - uses: actions/checkout@v6 - name: Setup uv (upgrade) uses: ./.github/actions/setup-uv with: python-version: ${{ matrix.python-version }} resolution: upgrade - name: Run unit tests uses: ./.github/actions/run-pytest - name: Run client process tests uses: ./.github/actions/run-pytest with: test-type: client_process run_integration_tests: name: "Integration tests" runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v6 - name: Setup uv (upgrade) uses: ./.github/actions/setup-uv with: resolution: upgrade - name: Run integration tests uses: ./.github/actions/run-pytest with: test-type: integration env: FASTMCP_GITHUB_TOKEN: ${{ secrets.FASTMCP_GITHUB_TOKEN }} FASTMCP_TEST_AUTH_GITHUB_CLIENT_ID: ${{ secrets.FASTMCP_TEST_AUTH_GITHUB_CLIENT_ID }} FASTMCP_TEST_AUTH_GITHUB_CLIENT_SECRET: ${{ secrets.FASTMCP_TEST_AUTH_GITHUB_CLIENT_SECRET }} notify: name: Notify on failure needs: [static_analysis, run_tests, run_integration_tests] if: failure() && github.event.pull_request == null runs-on: ubuntu-latest steps: - name: Create or update failure issue uses: jayqi/failed-build-issue-action@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} label: "build-failure" title-template: "Upgrade checks failing on main branch" body-template: | ## Upgrade Checks Failure on Main Branch The upgrade checks workflow has failed on the main branch. **Workflow Run**: [#{{runNumber}}]({{serverUrl}}/{{repo.owner}}/{{repo.repo}}/actions/runs/{{runId}}) **Commit**: {{sha}} **Branch**: {{ref}} **Event**: {{eventName}} ### What to do This likely means that upgraded dependencies have introduced new errors. Please review the failed jobs and determine if the code needs to be updated or if dependency constraints need to be adjusted. - [ ] Review the failure in the workflow run - [ ] Identify root cause (dependency changes, new linter/type rules, etc.) - [ ] Implement fix or adjust dependency constraints - [ ] Verify fix resolves the issue --- *This issue was automatically created by a GitHub Action.*