Skip to content

feat(repo): switch to yarn pnp #1459

feat(repo): switch to yarn pnp

feat(repo): switch to yarn pnp #1459

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * *'
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
jobs:
main:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' && github.event_name != 'schedule' }}
steps:
- uses: actions/checkout@v4
name: Checkout [main]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: yarn --immutable
- run: yarn nx affected --target=lint --parallel --max-parallel=3
- run: yarn nx affected --target=build --parallel --max-parallel=3
- run: yarn nx affected --target=test --parallel --max-parallel=2
- run: yarn nx affected --target=e2e --parallel --max-parallel=1 --exclude=nx-ignore-e2e
- run: yarn nx-cloud stop-all-agents
nightly:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'schedule' }}
steps:
- uses: actions/checkout@v4
name: Checkout [main]
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: yarn --immutable
- run: yarn nx run-many -t=build,test,lint --parallel --max-parallel=3
- run: yarn nx affected -t=e2e --parallel --max-parallel=1 --exclude=nx-ignore-e2e
- run: yarn nx-cloud stop-all-agents
pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: yarn --immutable
- run: yarn nx affected --target=lint --parallel --max-parallel=3
- run: yarn nx affected --target=build --parallel --max-parallel=3
- run: yarn nx affected --target=test --parallel --max-parallel=2
- run: yarn nx affected --target=e2e --parallel --max-parallel=1 --exclude=nx-ignore-e2e
- run: yarn nx-cloud stop-all-agents
agents:
runs-on: ubuntu-latest
name: Agent 1
timeout-minutes: 60
strategy:
matrix:
agent: [1, 2, 3]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: yarn --immutable
- name: Start Nx Agent ${{ matrix.agent }}
run: yarn nx-cloud start-agent