Repository navigation
127 lines (103 loc) · 3.56 KB
/
Copy pathci.yml
File metadata and controls
127 lines (103 loc) · 3.56 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
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
name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
toolchain:
name: Fresh Corepack and Yarn (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '26'
package-manager-cache: false
# Node 25 and later no longer bundle Corepack. Runner images ship Yarn 1,
# whose global launcher blocks Corepack's own (EEXIST on Windows).
- name: Install and enable Corepack
shell: bash
run: |
npm uninstall --global yarn
npm install --global corepack@latest
corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Test package manager setup
run: yarn vitest run packages/purestack/src/init/package-manager.test.ts
- name: Verify fresh installation and reuse with isolated tools
run: yarn verify-toolchain
checks:
name: Checks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '26'
package-manager-cache: false
# Node 25 and later no longer bundle Corepack. Runner images ship Yarn 1,
# whose global launcher blocks Corepack's own (EEXIST on Windows).
- name: Install and enable Corepack
shell: bash
run: |
npm uninstall --global yarn
npm install --global corepack@latest
corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Check line endings
run: yarn check-eol
- name: Regenerate Regor component metadata
run: yarn regor-components
- name: Regenerate embedded scripts
run: yarn embed
- name: Format repository
run: yarn format
- name: Verify generated and formatted files are committed
shell: bash
run: |
if [[ -n "$(git status --porcelain --untracked-files=all)" ]]; then
echo "::error::Run yarn regor-components, yarn embed, and yarn format locally, then commit the resulting changes."
git status --short --untracked-files=all
git diff --stat
exit 1
fi
- name: Lint without changing files
run: yarn lint:ci
- name: Type-check packages
run: yarn build
- name: Type-check VS Code extension with root TypeScript
run: yarn exec tsc -p packages/ts-ssg-vscode/tsconfig.json --noEmit
- name: Test
run: yarn test:ci
- name: Bundle distributable packages
if: runner.os == 'Linux'
run: yarn bundle
- name: Pack packages and verify standalone templates
if: runner.os == 'Linux'
run: yarn verify-templates