-
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.21 KB
/
ci.yaml
File metadata and controls
54 lines (44 loc) · 1.21 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
name: Continuous Integration
on:
pull_request:
branches:
- main
jobs:
build-lint-test:
name: Build, Lint, and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: package.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm run test:run
is-bundled:
name: Check if bundled
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if bundled
run: |
if [ ! -f dist/index.js ]; then
echo "The project is not bundled. Please run the build step.";
exit 1;
fi
- name: Check if dist/index.js is updated in PR
run: |
if ! git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q '^dist/index.js$'; then
echo "dist/index.js was not updated in this PR. Please update the bundle.";
exit 1;
fi