-
-
Notifications
You must be signed in to change notification settings - Fork 11
136 lines (118 loc) · 3.36 KB
/
nodejs.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
push:
branches:
- main
- 'v*' # older version branches
tags:
- '*'
pull_request: {}
schedule:
- cron: '0 6 * * 0' # weekly, on sundays
# --ignore-scripts is used everywhere here because
# we want manual control over the build.
# the pre* scripts (ran via exclusion of --ignore-scripts) are kept for local development
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install --ignore-scripts
- run: pnpm lint
# To simulate what would happen when we push a release
# out to consumers, we're only going to build once, and
# then download the copy of those assets in each test job.
#
# This allows us to test against various node versions without
# changing how we compile (since consumers will not be compiling this library)
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install --ignore-scripts
- run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: bulit-assets
path: dist
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20']
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node }}
- run: pnpm install --ignore-scripts
- uses: actions/download-artifact@v4
with:
name: bulit-assets
path: dist
- run: pnpm test
test_old:
name: Tests (Node 14)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 14
# lockfile format version 9 didn't exist with pnpm 7
# ignore scripts because
- run: pnpm install --no-lockfile --ignore-scripts
- uses: actions/download-artifact@v4
with:
name: bulit-assets
path: dist
- run: pnpm test
floating-test:
name: Floating dependencies and build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install --no-lockfile
- run: pnpm test
min-glimmer-syntax:
name: Latest @glimmer/syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install --no-lockfile --ignore-scripts
- uses: actions/download-artifact@v4
with:
name: bulit-assets
path: dist
- run: pnpm update @glimmer/syntax@0.84.3
- run: npx y-which @glimmer/syntax
# We use jest directly, because we don't want `pretest` to run,
# because we don't need to compile again
# (and don't want to since we changed the @glimmer/syntax version
# and TS would fail)
- run: pnpm jest