name: Pull requests on: pull_request: merge_group: permissions: contents: read env: # Among other things, opts out of Turborepo telemetry # See https://consoledonottrack.com/ DO_NOT_TRACK: '1' # Some tasks slow down considerably on GitHub Actions runners when concurrency is high TURBO_CONCURRENCY: 1 # Enables Turborepo Remote Caching. TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }} jobs: # Needed for grouping check-web3 strategies into one check all-web3-checks: runs-on: ubuntu-latest needs: build-and-test steps: - run: echo "Done" build-and-test: runs-on: ubuntu-latest strategy: matrix: node: - 'current' - 'lts/*' name: Build & Test on Node ${{ matrix.node }} steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install Dependencies uses: ./.github/workflows/actions/install-dependencies with: version: ${{ matrix.node }} - name: Setup Solana Test Validator id: start-test-validator uses: ./.github/workflows/actions/setup-validator - name: Build & Test run: pnpm build # Don't add --concurrency here; it's already baked in - name: Smoke-test React example dev server timeout-minutes: 2 working-directory: examples/react-app run: pnpm test:dev - name: Stop Test Validator if: always() && steps.start-test-validator.outcome == 'success' run: kill ${{ steps.start-test-validator.outputs.pid }} dependabot: runs-on: ubuntu-latest if: github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'anza-xyz/kit' needs: [build-and-test] steps: - name: Create github token uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 id: app-token with: client-id: ${{ vars.CLIENT_ID }} private-key: ${{ secrets.PRIVATE_KEY }} - name: Auto-approve the PR run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ steps.app-token.outputs.token }} - name: Enable auto-merge run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ steps.app-token.outputs.token }}