Skip to content

Commit eb252a7

Browse files
authored
Update pr-triggering.yaml
1 parent 3c17788 commit eb252a7

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
name: Test Before Merge
1+
name: Pull Request Testing
22

3+
# Trigger the workflow on pull requests targeting specific branches
34
on:
45
pull_request:
56
branches:
6-
- master
7+
- main # Target branch: main
8+
- dev # Target branch: dev
79

810
jobs:
911
test:
12+
# Specify the type of machine to run the job
1013
runs-on: ubuntu-latest
1114

1215
steps:
13-
# Step 1: Check out the code from the pull request
16+
# Step 1: Checkout the repository code
1417
- name: Checkout code
1518
uses: actions/checkout@v3
1619

17-
# Step 2: Set up the runtime environment
20+
# Step 2: Set up a specific programming language environment (example: Node.js)
1821
- name: Set up Node.js
1922
uses: actions/setup-node@v3
2023
with:
@@ -24,6 +27,10 @@ jobs:
2427
- name: Install dependencies
2528
run: npm install
2629

27-
# Step 4: Run unit tests
30+
# Step 4: Run tests
2831
- name: Run tests
2932
run: npm test
33+
34+
# Step 5: Lint the code (optional step)
35+
- name: Run linting
36+
run: npm run lint

0 commit comments

Comments
 (0)