name: test on: workflow_run: workflows: [types] types: [completed] branches: [master, main] permissions: contents: read jobs: test: name: test runs-on: ubuntu-latest environment: test if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.workflow_run.head_branch }} - uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - run: npm ci - name: Run tests run: npm test || echo "No tests configured"