name: Test on: pull_request: push: branches: - main permissions: contents: read jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: node: [22, 24, 26] env: FORCE_COLOR: 1 name: test / Node ${{ matrix.node }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: fetch-depth: 0 - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 env: FORCE_COLOR: 0 with: node-version: ${{ matrix.node }} cache: pnpm - run: pnpm install --frozen-lockfile --prefer-offline - name: Check shared pnpm supply-chain policy uses: TryGhost/renovate-config/.github/actions/pnpm-policy@f01112f88f6152d69a300577d7b21112aa75f16e # main - run: pnpm test:ci - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7 with: token: ${{ secrets.CODECOV_TOKEN }} - uses: tryghost/actions/actions/slack-build@effade3b0d63f664a12c0a60a102a37b66821bd2 # main if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' with: status: ${{ job.status }} env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # Single stable check for branch protection, so the ruleset doesn't need # updating whenever the Node matrix changes. required: name: Required CI checks pass needs: [build] if: always() runs-on: ubuntu-latest steps: - name: Check build result env: RESULT: ${{ needs.build.result }} run: | echo "build: $RESULT" if [ "$RESULT" != "success" ]; then echo "Required jobs did not succeed. You may need to re-run them." exit 1 fi