File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
- name : Test Before Merge
1
+ name : Pull Request Testing
2
2
3
+ # Trigger the workflow on pull requests targeting specific branches
3
4
on :
4
5
pull_request :
5
6
branches :
6
- - master
7
+ - main # Target branch: main
8
+ - dev # Target branch: dev
7
9
8
10
jobs :
9
11
test :
12
+ # Specify the type of machine to run the job
10
13
runs-on : ubuntu-latest
11
14
12
15
steps :
13
- # Step 1: Check out the code from the pull request
16
+ # Step 1: Checkout the repository code
14
17
- name : Checkout code
15
18
uses : actions/checkout@v3
16
19
17
- # Step 2: Set up the runtime environment
20
+ # Step 2: Set up a specific programming language environment (example: Node.js)
18
21
- name : Set up Node.js
19
22
uses : actions/setup-node@v3
20
23
with :
24
27
- name : Install dependencies
25
28
run : npm install
26
29
27
- # Step 4: Run unit tests
30
+ # Step 4: Run tests
28
31
- name : Run tests
29
32
run : npm test
33
+
34
+ # Step 5: Lint the code (optional step)
35
+ - name : Run linting
36
+ run : npm run lint
You can’t perform that action at this time.
0 commit comments