Skip to content

Update run-pty (#96) #383

Update run-pty (#96)

Update run-pty (#96) #383

Workflow file for this run

name: Example
on:
push:
branches:
- "main"
pull_request:
jobs:
main:
runs-on: ubuntu-latest
defaults:
run:
working-directory: example
steps:
- uses: actions/checkout@v3
with:
submodules: true
- 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/node_modules
example/public/submodules/seeds-game/node_modules
key: node_modules-${{ hashFiles('example/package.json', 'example/package-lock.json', 'example/public/submodules/seeds-game/package.json', 'example/public/submodules/seeds-game/package-lock.json') }}
- name: Cache ~/.elm
uses: actions/cache@v3
with:
path: ~/.elm
key: elm-${{ hashFiles('example/elm.json', 'example/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: esbuild
run: npm run esbuild -- --minify
- name: elm-format
run: npx elm-format --validate src