-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (36 loc) · 986 Bytes
/
js-build.yml
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
name: js-build
on:
push:
branches:
- main
pull_request:
workflow_dispatch: # Allows manual invocation
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
# Install and cache JS toolchain and dependencies (node_modules)
- name: Setup JS
uses: ./.github/actions/js-setup
- name: Build
run: pnpm run build-all
- name: Typecheck
run: pnpm run typecheck-all
- name: Test
run: pnpm run test-all
- name: Prettier
run: pnpm run prettier-all:check
- name: Ensure git is clean
run: |
if [ -z "$( git status --porcelain )" ]; then
echo "Git is clean!"
exit 0
else
echo "Git is dirty!"
git add -A
git --no-pager diff HEAD
exit 1
fi