Skip to content

HTTP server

HTTP server #322

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@v3
- uses: actions/setup-node@v3
with:
node-version: 20
# 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@v3
with:
path: node_modules
key: internal-node_modules-ubuntu-latest-20-${{ 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@v3
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@v3
with:
path: ~/.elm
key: elm-${{ hashFiles('example-minimal/elm.json', 'example-minimal/elm-tooling.json') }}
- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
env:
NO_ELM_TOOLING_INSTALL: 1
run: npm ci --no-audit
- name: elm-tooling install
run: npx elm-tooling install
- name: elm-watch make
run: npx elm-watch make --optimize
- name: elm-format
run: npx elm-format --validate src