-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.45 KB
/
node-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
36
37
38
39
40
41
42
43
44
45
46
on:
pull_request:
branches: [main]
name: node-ci
permissions:
pull-requests: read # allows SonarQube to decorate PRs with analysis results
jobs:
sonar-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args:
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
-Dsonar.sources=src
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/
#-Dsonar.verbose= # optional, default is false
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
node-version: [18.x, 20.x, 21.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
with:
version: 8.15.4
- run: pnpm i --no-frozen-lockfile
- run: pnpm test
env:
SCI_API_ENDPOINT: ${{ secrets.SCI_API_ENDPOINT }}
SCI_API_USER: ${{ secrets.SCI_API_USER }}
SCI_API_PASSWORD: ${{ secrets.SCI_API_PASSWORD }}
- run: pnpm build