Skip to content

Build

Build #4500

Workflow file for this run

name: Build
on:
push:
pull_request:
schedule:
- cron: 0 0 * * * # daily
defaults:
run:
working-directory: src/SfxWeb
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 16.x
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: lint
run: npm run lint
- name: Check for any .only in Cypress e2e test
run: npm run stop-only
- name: Build
run: npm run build:prod
- name: Test
run: npm run ci:test
- name: E2E test
run: npm run ci:cy-run
- name: upload failed
uses: actions/upload-artifact@v2-preview
if: always()
with:
name: cypress-screenshots
path: /home/runner/work/service-fabric-explorer/service-fabric-explorer/src/SfxWeb/cypress/*