Skip to content

Merge pull request #9 from zeroreign/feature/show-pokemon-details #28

Merge pull request #9 from zeroreign/feature/show-pokemon-details

Merge pull request #9 from zeroreign/feature/show-pokemon-details #28

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Frontend CI
on:
push:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/Frontend.yml'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/Frontend.yml'
defaults:
run:
shell: bash
working-directory: ./frontend
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ./frontend/package-lock.json
- name: Install Backend Dependencies
run: |
npm ci &&
npm run build &&
npm run start:prod --prefix ../backend/ &
working-directory: ./backend
- name: Install Frontend Dependencies
run: |
npm ci &&
npm run lint &&
npm run build
- name: Run Jest Test
run: npm test -- --coverage