Add elm-watch-lib #415
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
# 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@v4 | |
with: | |
path: node_modules | |
key: internal-node_modules-ubuntu-latest-22-${{ 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@v4 | |
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@v4 | |
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 |