-
Notifications
You must be signed in to change notification settings - Fork 446
40 lines (37 loc) · 1.41 KB
/
analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
# 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: Code Analysis
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
environment: build
# OS List
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/[email protected]
# https://github.com/marketplace/actions/setup-node-js-environment
- name: Use Node.js 20.x
uses: actions/[email protected]
with:
node-version: 20.x
#cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm run unit
# https://github.com/marketplace/actions/codecov
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
# https://github.com/marketplace/actions/official-fossa-action
- name: Upload to FOSSA
uses: fossas/[email protected]
with:
api-key: ${{ secrets.FOSSA_API_KEY }}