-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.28 KB
/
ci.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
46
47
48
on: [push]
name: build
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["20.x", "21.x"]
name: Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
node ./node_modules/elm/install.js
- name: Audit signatures
run: npm audit signatures
- name: Generate intermediate files
run: |
# By compiling both `Main.elm` and `Worker.elm`, we make sure all
# intermediate files are present before the next steps run.
#
# Otherwise, parcel would compile both files in parallel which can
# lead to data races and let one of the compiler processes fail with
# an error about corrupt files.
npx elm make app/elm/Main.elm --output /dev/null
npx elm make app/elm/Worker.elm --output /dev/null
- name: Run tests
run: npm test
- name: Build assets
run: npm run prod
- name: Check formatting
run: |
npx elm-format --validate app/elm tests
npx prettier --check "app/js/*.js"