continue work on mcp, this is getting cool #7
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: | |
| branches: ["**"] | |
| jobs: | |
| validate-branch: | |
| name: Validate Target Branch | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: YOU SHALL NOT PASS | |
| if: github.base_ref == 'main' && github.head_ref != 'develop' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "ERROR: Pull requests to 'main' are not allowed from ${{ github.head_ref }}." | |
| gh pr close ${{ github.event.pull_request.number }} \ | |
| --comment "ERROR: Pull requests to 'main' are not allowed. Current source branch: ${{ github.head_ref }}. Please create a PR to 'develop' first, this will become a release candidate when merged into 'main' by a maintainer." | |
| exit 1 | |
| - name: PR info | |
| if: always() | |
| run: | | |
| echo "PR validation check completed" | |
| echo "Source: ${{ github.head_ref }}" | |
| echo "Target: ${{ github.base_ref }}" | |
| tests: | |
| name: Tests now - BOOORING | |
| runs-on: ubuntu-latest | |
| needs: validate-branch | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup the gopher | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.26.0" | |
| cache: true | |
| - name: Tidy up | |
| run: go mod tidy | |
| - name: This will totally fail if you only use AI | |
| run: go vet ./... | |
| - name: Does it actually compile though | |
| run: go build ./... | |
| - name: Run tests | |
| run: go test -race -count=1 ./... |