File tree 4 files changed +79
-30
lines changed
4 files changed +79
-30
lines changed Original file line number Diff line number Diff line change
1
+ name : Workflow / Setup NodeJS
2
+ description : It setting up the NodeJS
3
+
4
+ runs :
5
+ using : composite
6
+ steps :
7
+ - name : Enable Corepack
8
+ run : corepack enable
9
+ shell : bash
10
+
11
+ - name : Setup NodeJS
12
+ uses : actions/setup-node@v4
13
+ with :
14
+ node-version-file : ' .nvmrc'
15
+ cache : ' yarn'
16
+
17
+ - name : Install dependencies
18
+ run : YARN_ENABLE_SCRIPTS=false YARN_ENABLE_HARDENED_MODE=0 yarn install --immutable
19
+ shell : bash
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : ' Reusable workflow / Unit tests'
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ ref :
7
+ description : ' The branch, tag or SHA to checkout'
8
+ default : ${{ github.ref }}
9
+ required : false
10
+ type : string
11
+
12
+ jobs :
13
+ test :
14
+ runs-on : ubuntu-latest
15
+ name : Run unit tests
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ ref : ${{ inputs.ref }}
20
+
21
+ - name : Node setup
22
+ uses : ./.github/actions/node-setup
23
+
24
+ - name : Run tests
25
+ run : yarn run test:ci
26
+
27
+ - name : Upload test artifact
28
+ uses : actions/upload-artifact@v4
29
+ with :
30
+ name : test-output
31
+ path : |
32
+ junit.xml
33
+
34
+ deploy_test_coverage :
35
+ needs : test
36
+ runs-on : ubuntu-latest
37
+ permissions :
38
+ id-token : write
39
+ steps :
40
+ - name : Checkout
41
+ uses : actions/checkout@v4
42
+
43
+ - name : Download test artifact
44
+ uses : actions/download-artifact@v4
45
+ with :
46
+ name : test-output
47
+
48
+ - name : Upload coverage to Codecov
49
+ uses : codecov/codecov-action@v5
50
+ with :
51
+ use_oidc : true
52
+ files : junit.xml
53
+ fail_ci_if_error : true
Original file line number Diff line number Diff line change 6
6
- master
7
7
pull_request :
8
8
9
+ concurrency :
10
+ group : test-${{ github.ref_name }}
11
+ cancel-in-progress : true
12
+
9
13
jobs :
10
14
lint :
11
15
runs-on : ubuntu-latest
@@ -16,15 +20,10 @@ jobs:
16
20
node-version : ' 18'
17
21
- run : yarn install --frozen-lockfile --ignore-scripts
18
22
- run : npm run lint
23
+
19
24
test :
20
- runs-on : ubuntu-latest
21
- steps :
22
- - uses : actions/checkout@v4
23
- - uses : actions/setup-node@v4
24
- with :
25
- node-version : ' 18'
26
- - run : yarn install --frozen-lockfile --ignore-scripts
27
- - run : npm run test:ci
25
+ uses : ./.github/workflows/reusable_workflow_test.yml
26
+
28
27
build :
29
28
runs-on : ubuntu-latest
30
29
steps :
You can’t perform that action at this time.
0 commit comments