-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (65 loc) · 2.08 KB
/
Copy pathci.yml
File metadata and controls
70 lines (65 loc) · 2.08 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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false
registry-url: "https://registry.npmjs.org"
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: "1.3.14"
- name: Pin npm
run: |
set -euo pipefail
npm install --global npm@11.19.0 \
--ignore-scripts \
--registry=https://registry.npmjs.org
test "$(npm --version)" = "11.19.0"
[[ "$(node --version)" == v24.* ]]
- run: bun install --frozen-lockfile --ignore-scripts
- run: bun run check
- run: |
generated_status="$(git status --porcelain --untracked-files=all -- dist bun.lock)"
if [[ -n "$generated_status" ]]; then
printf '%s\n' "$generated_status"
exit 1
fi
- run: bun pm pack --dry-run --ignore-scripts
- run: >-
node --input-type=module -e 'const manifest = (await import("./package.json", { with: { type: "json" } })).default; await Promise.all(Object.values(manifest.exports).map(({ import: path }) => import(path)))'
required:
name: Required
if: always()
needs: [check]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require every selected job
env:
CHECK: ${{ needs.check.result }}
run: |
set -euo pipefail
for result in "$CHECK"; do
if [[ "$result" != success ]]; then
printf 'Unexpected required job result: %s\n' "$result"
exit 1
fi
done