Skip to content

Commit

Permalink
Create build-frontend.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MocStepan authored Apr 3, 2024
1 parent 8e6fc05 commit 503fb68
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build frontend
run-name: "Run ${{github.run_id}}, triggered by ${{github.actor}}"

on:
push:
branches: "*"
pull_request:
branches: "*"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: frontend
strategy:
matrix:
node-version: [14.x, 16.x, 18.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'

- name: Install dependencies
run: npm ci

- name: Install Angular CLI
run: npm install -g @angular/cli

- name: Run build
run: npm run build --if-present

- name: Run tests
run: npm test

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: frontend
slug: ${{ github.repository }}
file: frontend/coverage/lcov-report/lcov.info

0 comments on commit 503fb68

Please sign in to comment.