pataruco is running PR validation #11
Workflow file for this run
This file contains 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 validation | |
run-name: ${{ github.actor }} is running PR validation | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
merge_group: | |
types: [checks_requested] | |
concurrency: | |
cancel-in-progress: true | |
group: '${{ github.workflow }} @ ${{ github.ref }}' | |
jobs: | |
prepare: | |
name: Prepare | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/prepare | |
conventional-commits: | |
name: Conventional Commits | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set environment and install dependencies | |
uses: ./.github/actions/prepare | |
- name: Conventional Commits | |
uses: ./.github/actions/conventional-commits | |
lint-format: | |
name: Linting and formatting | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set environment and install dependencies | |
uses: ./.github/actions/prepare | |
- uses: nrwl/nx-set-shas@v3 | |
# This line is needed for nx affected to work when CI is running on a PR | |
- run: git branch --track main origin/main | |
- name: Linting and formatting | |
run: pnpm nx affected run-many -t lint format | |
# - name: Linting and formatting | |
# uses: ./.github/actions/lint-format | |
pr-validation: | |
name: PR validation | |
needs: [prepare, conventional-commits, lint-format] | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Check jobs for errors | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const checkJobsForErrors = require('./.github/workflows/js/check-for-errors.js'); | |
const jobs = ${{ toJSON(needs) }}; | |
checkJobsForErrors({ core, jobs }); |