Skip to content

Merge branch 'ci' of https://github.com/bklingen-calpoly/csc307-react… #1

Merge branch 'ci' of https://github.com/bklingen-calpoly/csc307-react…

Merge branch 'ci' of https://github.com/bklingen-calpoly/csc307-react… #1

# 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
# add comment to redrive actions
name: Frontend React CI
on:
push:
branches: [main, with-subfolder, ci]
pull_request:
branches: [main, with-subfolder, ci]
defaults:
run:
working-directory: frontend
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "frontend/package-lock.json"
- run: npm ci
working-directory: frontend
- run: npm run build --if-present
working-directory: frontend
- run: npm test
working-directory: frontend