55 lines
1,014 B
YAML
55 lines
1,014 B
YAML
name: Build Web
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/web-*.yml'
|
|
- 'webclient/**'
|
|
- '!**.md'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/web-*.yml'
|
|
- 'webclient/**'
|
|
- '!**.md'
|
|
|
|
jobs:
|
|
build-web:
|
|
name: React (Node ${{matrix.node_version}})
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: webclient
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node_version:
|
|
- 12
|
|
- lts/*
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{matrix.node_version}}
|
|
cache: 'npm'
|
|
cache-dependency-path: 'webclient/package-lock.json'
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Test app
|
|
run: npm run test
|
|
|
|
- name: Build app
|
|
if: always()
|
|
run: npm run build
|