-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (49 loc) · 1.59 KB
/
example-minimal.yml
File metadata and controls
61 lines (49 loc) · 1.59 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
name: Example minimal
on:
push:
branches:
- "main"
pull_request:
jobs:
main:
runs-on: ubuntu-latest
defaults:
run:
working-directory: example-minimal
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
# Build elm-watch so we can use it in this example repo.
- name: Internal cache node_modules
id: internal-cache-node_modules
uses: actions/cache@v5
with:
path: node_modules
key: internal-node_modules-ubuntu-latest-24-${{ hashFiles('package.json', 'package-lock.json') }}
- name: Internal npm ci
if: steps.internal-cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
working-directory: .
- name: Internal build
run: npm run build
working-directory: .
- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v5
with:
path: example-minimal/node_modules
key: node_modules-${{ hashFiles('example-minimal/package.json', 'example-minimal/package-lock.json') }}
- name: Cache ~/.elm
uses: actions/cache@v5
with:
path: ~/.elm
key: elm-${{ hashFiles('example-minimal/elm.json', 'example-minimal/elm-tooling.json') }}
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --no-audit
env:
NO_ELM_TOOLING_INSTALL: 1
- run: npx elm-tooling install
- run: npx elm-watch make --optimize
- run: npx elm-format --validate src