-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.41 KB
/
nodejs.yml
File metadata and controls
47 lines (45 loc) · 1.41 KB
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
41
42
43
44
45
46
47
name: Node CI
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build NPM package, run lint analysis and tests
run: |
npm install
npm run lint
npm run test
env:
CI: true
- name: Code Climate Coverage Action
uses: paambaati/codeclimate-action@v9.0.0
with:
coverageCommand: npm run coverage
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov
debug: true
env:
CC_TEST_REPORTER_ID: 6c71e1a9cd02406833f3c2459cbdce25e6ab3d46c556ad12e64c0cf91b173de8
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.projectKey=ngarbezza_oow
-Dsonar.organization=ngarbezza
-Dsonar.projectName=OOW
-Dsonar.projectVersion=1.11.0
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
-Dsonar.coverage.exclusions=tests/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}