Repository navigation
72 lines (58 loc) · 2.24 KB
/
Copy pathci.yml
File metadata and controls
72 lines (58 loc) · 2.24 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
62
63
64
65
66
67
68
69
70
71
72
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
# Off because it probes `yarn cache dir` inside this step, which is before corepack is on
# -- so it runs the runner's global yarn 1 against a `packageManager` field it refuses.
package-manager-cache: false
# yarn comes from `packageManager`, so corepack has to be on before any yarn command.
- run: corepack enable
- run: yarn install --immutable
# Both builds. `__DEV__` guards whole branches here, and `itDev` / `itProd` pin cases to one
# of them, so a single pass leaves part of the suite unrun.
- run: yarn test
- run: yarn test:prod
# Also typechecks: `build` is `yarn typecheck && bob build`.
#
# Retried because bob builds its targets with Promise.all, and the commonjs target validates
# the `main` field -- which points into lib/module -- so it fails whenever it happens to
# finish before the module target has written that file. Nothing to fix on our side short of
# repointing `main` at the commonjs output, which would change what bundlers resolve.
- name: build
run: |
for attempt in 1 2 3; do
if yarn build; then exit 0; fi
echo "::warning::build attempt $attempt failed; retrying (known bob target race)"
done
exit 1
rozenite-plugin:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rozenite-plugin
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22
package-manager-cache: false
- run: corepack enable
# Its tests import Cellar's source, which resolves Cellar's own dependencies from the root install.
- run: yarn install --immutable
working-directory: .
- run: yarn install --immutable
# The plugin typechecks and builds against Cellar's declarations, which are not committed.
- run: yarn build:types
working-directory: .
- run: yarn typecheck
- run: yarn test
- run: yarn build