2.2.0 #2
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 | |
| steps: | |
| - name: YOU SHALL NOT PASS | |
| if: github.base_ref == 'main' | |
| run: | | |
| if [ "${{ github.head_ref }}" != "develop" ]; then | |
| echo "ERROR: Pull requests to 'main' are not allowed." | |
| echo "Current source branch: ${{ github.head_ref }}" | |
| echo "" | |
| echo "Please create a PR to 'develop' first, this will become a release candidate when merged into 'main' by a maintainer" | |
| exit 1 | |
| fi | |
| echo "Valid PR: develop → main" | |
| - name: PR info | |
| run: | | |
| echo "PR validation passed" | |
| echo "Source: ${{ github.head_ref }}" | |
| echo "Target: ${{ github.base_ref }}" | |
| typing: | |
| name: Type and install checks | |
| runs-on: ubuntu-latest | |
| needs: validate-branch | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup the best engine ever | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "yarn" | |
| - name: Install all dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: This will totally fail if you only use AI | |
| run: yarn tsc --noEmit |