Skip to content

Commit

Permalink
Merge pull request #18 from MocStepan/feature/frontend-build
Browse files Browse the repository at this point in the history
Create node.js.yml
  • Loading branch information
MocStepan authored Apr 3, 2024
2 parents 3fe5374 + d2c5c98 commit 8091b6b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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'
- run: npm ci

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

- name: Run test
- run: npm test
- run: ng test --code-coverage --watch=false

- 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 8091b6b

Please sign in to comment.