Allow editing example products. #4078
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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [ v2 ] | |
pull_request: | |
branches: [ v2 ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Cache node_modules | |
id: cache-node_modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: node_modules-${{ hashFiles('package.json', 'package-lock.json') }} | |
- name: Cache ~/.elm | |
# see https://docs.microsoft.com/en-us/answers/questions/510640/deploy-elm-app-to-azure-static-website-from-github.html | |
uses: actions/cache@v2 | |
with: | |
path: ~/.elm | |
key: elm-cache-${{ hashFiles('elm.json') }} | |
restore-keys: elm-cache- | |
- name: Install dependencies | |
run: npm ci --prefer-offline --no-audit | |
- name: Build app | |
run: npm run build --if-present | |
- name: Build Elm static Db | |
run: npm run db:build | |
- name: Run prettier formatting check | |
run: npm run format:check | |
- name: Run elm-review | |
run: npm run test:review | |
- name: Run client tests | |
run: npm run test:client | |
- name: Run server tests | |
run: npm run test:server |