feat(extensions): Add TealTiger deterministic governance middleware #6342
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: PR checks | |
| on: | |
| pull_request: | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_dispatch: # allows manual triggering of the workflow | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| # Ceiling for GITHUB_TOKEN; each job narrows with its own permissions block (zizmor). | |
| # contents:write is required so the build-mkdocs job can call build-mkdocs.yml (workflow_call). | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| pre-commit-check: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| env: | |
| SKIP: "mypy" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| lfs: true | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0 | |
| with: | |
| version: "latest" | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.10" | |
| - uses: j178/prek-action@e98a699c41eb69ab013a45817a0406469a748f8d # v2.0.5 | |
| type-check: | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0 | |
| with: | |
| version: "latest" | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.10" | |
| - run: uv pip install --system --group types . | |
| # Any additional configuration for mypy should be defined in pyproject.toml under the [tool.mypy] section | |
| - run: | | |
| mypy | |
| docs-paths-filter: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| runs-on: ubuntu-latest | |
| outputs: | |
| hasChanges: ${{ steps.filter.outputs.ag2 == 'true' || steps.filter.outputs.website == 'true' || steps.filter.outputs.workflows == 'true' || steps.filter.outputs.setup == 'true' || steps.filter.outputs.scripts == 'true' }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| ag2: | |
| - "ag2/**" | |
| website: | |
| - "website/**" | |
| workflows: | |
| - ".github/workflows/pr-checks.yml" | |
| setup: | |
| - "pyproject.toml" | |
| - ".muffet-excluded-links.txt" | |
| scripts: | |
| - "scripts/mkdocs-check-broken-links.sh" | |
| - "scripts/docs_build_mkdocs.sh" | |
| - "scripts/docs_serve_mkdocs.sh" | |
| build-mkdocs: | |
| needs: docs-paths-filter | |
| if: needs.docs-paths-filter.outputs.hasChanges == 'true' | |
| permissions: | |
| contents: write | |
| uses: ./.github/workflows/build-mkdocs.yml | |
| with: | |
| python-version: "3.10" | |
| pr-check: | |
| permissions: | |
| contents: read | |
| if: always() | |
| runs-on: ubuntu-latest | |
| needs: [pre-commit-check, type-check, build-mkdocs] | |
| steps: | |
| - name: Get Date | |
| shell: bash | |
| run: | | |
| echo "date=$(date +'%m/%d/%Y %H:%M:%S')" >> "$GITHUB_ENV" | |
| - name: Run Type is ${{ github.event_name }} | |
| if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'}} | |
| shell: bash | |
| run: | | |
| echo "run_type=${{ github.event_name }}" >> "$GITHUB_ENV" | |
| - name: Fail workflow if build failed | |
| id: check_build_failed | |
| if: contains(join(needs.*.result, ','), 'failure') | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: core.setFailed('Build Failed!') | |
| - name: Fail workflow if build cancelled | |
| id: check_build_cancelled | |
| if: contains(join(needs.*.result, ','), 'cancelled') | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: core.setFailed('Build Cancelled!') |