-
-
Notifications
You must be signed in to change notification settings - Fork 40
63 lines (51 loc) · 1.47 KB
/
Copy pathcheck_dist.yml
File metadata and controls
63 lines (51 loc) · 1.47 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
---
name: Check dist
# Node-runtime actions execute the committed `dist/` bundle, not `src/`. This
# workflow type-checks and tests the source, rebuilds the bundle, and fails if
# the committed `dist/` has drifted from `src/`.
on:
workflow_dispatch:
pull_request:
paths:
- src/**
- dist/**
- package.json
- bun.lock
- tsconfig.json
- .github/workflows/check_dist.yml
push:
branches: [main]
paths:
- src/**
- dist/**
- package.json
- bun.lock
- tsconfig.json
permissions:
contents: read
jobs:
Check-dist:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Cache dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Type-check
run: bun run typecheck
- name: Format check
run: bun run format:check
- name: Test
run: bun test
- name: Build and verify dist is in sync
run: bun run build:check