forked from LeetCode-in-JavaScript/LeetCode-in-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 815 Bytes
/
node.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
name: JavaScript CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
unitTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 8.8.0
- name: Install dependencies
run: |
pnpm install
- name: Run tests
run: |
pnpm run coverage
ls -al coverage
- name: SonarCloud Scan
uses: sonarsource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: 3846aa5041adeb0739dbe72dc92e77078e041a0e