-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.52 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# 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
- run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e"
# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Set up FontAwesome NPM registry
run: ./fontawesome-npmrc.sh
env:
FONTAWESOME_KEY: ${{ secrets.FONTAWESOME_KEY }}
- run: yarn install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
# Run lint, test, build, and e2e tasks explicitly
- name: Run Lint
run: npx nx run-many --target=lint --all --skip-nx-cache --parallel=3
- name: Run Tests
run: npx nx run-many --target=test --all --skip-nx-cache --parallel=3
- name: Run Build
run: npx nx run-many --target=build --all --skip-nx-cache --parallel=3
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run E2E Tests
run: npx nx run-many --target=e2e --all --skip-nx-cache --parallel=3
env:
CI: true
timeout-minutes: 10