Skip to content

Commit 0a9ccc5

Browse files
committed
correct CI config
1 parent cbb4dea commit 0a9ccc5

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [main]
76
pull_request:
7+
branches: [main]
88

99
permissions:
1010
actions: read
1111
contents: read
1212

1313
jobs:
14-
main:
14+
checks:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
1819
with:
1920
fetch-depth: 0
2021

@@ -23,16 +24,17 @@ jobs:
2324
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
2425
- run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"
2526

26-
# Cache node_modules
27-
- uses: actions/setup-node@v4
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v4
2829
with:
29-
node-version: 20
30-
cache: 'npm'
30+
node-version-file: .nvmrc
31+
cache: npm
3132

32-
- run: npm ci --legacy-peer-deps
33-
- uses: nrwl/nx-set-shas@v4
33+
- name: Set base and head for Nx affected commands
34+
uses: nrwl/nx-set-shas@v4
3435

35-
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
36-
# - run: npx nx-cloud record -- echo Hello World
37-
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
38-
- run: npx nx affected -t lint test build e2e-ci
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Test affected projects
40+
run: npx nx test --configuration=ci

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.11.1

0 commit comments

Comments
 (0)