org
1name: CI
2
3on:
4push:
5branches:
6- main
7pull_request:
8
9permissions:
10actions: read
11contents: read
12
13jobs:
14main:
15runs-on: ubuntu-latest
16steps:
17- uses: actions/checkout@v4
18with:
19fetch-depth: 0
20
21# Connect your workspace on nx.app and uncomment this to enable task distribution.
22# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
23# - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci"
24
25# Cache node_modules
26- uses: actions/setup-node@v3
27with:
28node-version: 20
29cache: 'npm'
30
31- run: npm ci
32- uses: nrwl/nx-set-shas@v4
33
34# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
35# - run: npx nx-cloud record -- echo Hello World
36- run: npx nx affected -t lint test build
37- run: npx nx affected --parallel 1 -t e2e-ci
38