-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (35 loc) · 1.07 KB
/
ci.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
name: CI
on: [push]
jobs:
ci:
name: CI - OS ${{ matrix.os }}, Node.js ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [17.x, 18.x, 19.x]
steps:
- name: Check out repository code
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
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run prod
- name: Test
run: npm run test
- name: Upload coverage report
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '19.x' }}
uses: codecov/codecov-action@v3
- name: SonarCloud Scan
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '19.x' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}