File tree Expand file tree Collapse file tree 5 files changed +59
-13
lines changed Expand file tree Collapse file tree 5 files changed +59
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Installing Node.js Packages
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ build :
8
+ name : Installing Node.js Packages
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
Original file line number Diff line number Diff line change 1
1
name : Node.js CI
2
2
3
3
on :
4
- # Trigger when a new commit is pushed in main branch
4
+ # Trigger when a new pull request in main branch
5
5
pull_request :
6
6
branches :
7
7
- main
8
8
9
9
jobs :
10
- build :
11
- name : Run Tests
12
- runs-on : ubuntu-latest
13
- steps :
14
- # checkout the code
15
- - uses : actions/checkout@v2
16
- # setup the nodejs environment
17
- - uses : actions/setup-node@v2
18
- with :
19
- node-version : 16
20
- - run : npm install
21
- - run : npm run test
10
+ checkout_code :
11
+ name : Checkout Code
12
+ uses : ./github/workflows/checkout_code.yml
13
+ setup_node :
14
+ name : Installing Node.js
15
+ uses : ./github/workflows/setup_node.yml
16
+ install_packages :
17
+ name : Installing Node.js Packages
18
+ uses : ./github/workflows/install_packages.yml
19
+ run_test :
20
+ name : Run Test Case in Node.js Application
21
+ uses : ./github/workflows/run_test.yml
Original file line number Diff line number Diff line change
1
+ name : Installing Node.js Packages
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ build :
8
+ name : Installing Node.js Packages
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - run : npm install
Original file line number Diff line number Diff line change
1
+ name : Run Node.js Project Test Cases
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ build :
8
+ name : Run Node.js Project Test Cases
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - run : npm test
Original file line number Diff line number Diff line change
1
+ name : Setup Node.js
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ jobs :
7
+ build :
8
+ name : Installing Node
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/setup-node@v2
12
+ with :
13
+ node-version : 16
You can’t perform that action at this time.
0 commit comments