Skip to content

chore(pr): add pull requests workflow #6

chore(pr): add pull requests workflow

chore(pr): add pull requests workflow #6

Workflow file for this run

on:
pull_request:
types: [opened, synchronize, reopened]
# cancel previous runs on the same PR
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
name: ⛷ PR tests
env:
CI: true
defaults:
run:
shell: bash
jobs:
build-and-test:
name: 🏗 Build Project & 🧪 Run Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: pnpm/[email protected]
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: '🧪 Test linter'
run: pnpm run test-linter
- name: '🏗 Test types'
run: pnpm test-type
- name: '🏗 Test unit'
run: pnpm test-unit