-
Notifications
You must be signed in to change notification settings - Fork 44
61 lines (54 loc) · 1.85 KB
/
ci.yml
File metadata and controls
61 lines (54 loc) · 1.85 KB
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
59
60
61
name: CI
on:
push:
branches:
- main
pull_request:
# Needed for nx-set-shas when run on the main branch
permissions:
actions: read
contents: read
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
# Fetch full history so `nx affected` can determine what to run
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
cache: 'pnpm'
node-version: 24
- name: Install npm package dependencies
run: pnpm install --frozen-lockfile
# Clean stale TypeScript build info files that prevent types.d.ts generation
- name: Clean stale build artifacts
run: |
find packages -name "*.tsbuildinfo" -delete
pnpm nx reset
# pre-build console to get around some odd bugs that seem to be related to nx 21
# TODO: Try to get rid of this later. If the build ever succeeds without
# running this step first, it's working correctly, and we can delete this.
- name: Pre-build console
shell: bash
working-directory: ./packages/console
run: |
pnpm install
pnpm nx build @storacha/ui-core
pnpm nx build @storacha/ui-react
pnpm build
# Set the base and head that `nx affected` will use
- uses: nrwl/nx-set-shas@v4
env:
NX_VERBOSE_LOGGING: ${{ runner.debug && 'true' || 'false' }}
- name: Prepare environment
run: pnpm nx affected -t prepare-environment
env:
NX_VERBOSE_LOGGING: ${{ runner.debug && 'true' || 'false' }}
# Run CI tasks over all affected projects
# TODO: Add `attw` back once fixed.
- run: pnpm nx affected -t typecheck lint build test depcheck
env:
NX_VERBOSE_LOGGING: ${{ runner.debug && 'true' || 'false' }}