File tree Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Expand file tree Collapse file tree 2 files changed +53
-15
lines changed Original file line number Diff line number Diff line change
1
+ name : Node.js CI Coverage
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main", "develop", "feature/*" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ build :
11
+
12
+ runs-on : ubuntu-latest
13
+
14
+ strategy :
15
+ matrix :
16
+ os : [
17
+ " ubuntu-latest"
18
+ ]
19
+ node-version : [22.x]
20
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21
+
22
+ steps :
23
+ - name : Checkout repository
24
+ uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4
25
+
26
+ - name : Set up Node.js ${{ matrix.node-version }}
27
+ uses : actions/setup-node@v4
28
+ with :
29
+ node-version : ${{ matrix.node-version }}
30
+
31
+ - name : Install dependencies
32
+ run : npm ci --verbose
33
+
34
+ - name : Lint
35
+ run : npm run lint
36
+
37
+ - name : Run the tests
38
+ run : npm test -- --coverage
39
+
40
+ - name : Upload coverage reports to Codecov with GitHub Action
41
+ uses : codecov/codecov-action@v4
42
+ with :
43
+ token : ${{ secrets.CODECOV_TOKEN }} # required
44
+ verbose : true # optional (default = false)
45
+
46
+ - name : SonarCloud Scan
47
+ uses : SonarSource/sonarcloud-github-action@master
48
+ env :
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
50
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
Original file line number Diff line number Diff line change 1
- name : Node.js CI
1
+ name : Node.js CI Tests
2
2
3
3
on :
4
4
push :
18
18
" ubuntu-latest" ,
19
19
" macOS-latest"
20
20
]
21
- node-version : [18 .x, 19 .x, 20 .x]
21
+ node-version : [19 .x, 20 .x, 22 .x]
22
22
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23
23
24
24
steps :
37
37
run : npm run lint
38
38
39
39
- name : Run the tests
40
- run : npm test -- --coverage
41
-
42
- - name : Upload coverage reports to Codecov with GitHub Action
43
- uses : codecov/codecov-action@v4
44
- with :
45
- token : ${{ secrets.CODECOV_TOKEN }} # required
46
- verbose : true # optional (default = false)
47
-
48
- - name : SonarCloud Scan
49
- uses : SonarSource/sonarcloud-github-action@master
50
- env :
51
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
52
- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
40
+ run : npm test
You can’t perform that action at this time.
0 commit comments