forked from gperdomor/nx-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (37 loc) · 1.27 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
include:
- template: Workflows/MergeRequest-Pipelines.gitlab-ci.yml
- component: gitlab.com/gl-components/nx-set-shas/nx-set-shas@1.0.1
workflow:
auto_cancel:
on_new_commit: conservative
default:
image: node:22
variables:
CI: 'true'
GIT_DEPTH: 0
NX_CLOUD_ACCESS_TOKEN: $NX_CLOUD_TOKEN
HUSKY: 0
.node-cache: &node-cache
key:
files:
- package-lock.json
paths:
- .npm/
policy: pull
# Main job
CI:
interruptible: true
cache:
<<: *node-cache
policy: pull-push
script:
# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
# - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
- npm ci --legacy-peer-deps --cache .npm --prefer-offline
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - npx nx-cloud record -- echo Hello World
- npx nx-cloud record -- nx format:check --base=$NX_BASE --head=$NX_HEAD
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- npx nx affected --base=$NX_BASE --head=$NX_HEAD -t lint test build