Skip to content

Commit cad64cb

Browse files
committed
workflows: split to main and pr
Signed-off-by: Jussi Maki <[email protected]>
1 parent c8c4b02 commit cad64cb

File tree

2 files changed

+45
-25
lines changed

2 files changed

+45
-25
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: main
22
on:
3-
pull_request:
4-
branches:
5-
- main
63
push:
74
branches:
85
- main
96

107
env:
11-
GO_VERSION: 1.21.3
8+
GO_VERSION: 1.22.2
129

1310
jobs:
1411
test:
@@ -22,25 +19,5 @@ jobs:
2219
fetch-depth: 0
2320
- name: test
2421
run: |
25-
echo '```' > results.comment
26-
echo "$ make test" >> results.comment
27-
make test 2>&1 | tee test.out
28-
cat test.out | tail -20 >> results.comment
29-
echo "-----" >> results.comment
30-
31-
- name: test-race
32-
run: |
33-
make test-race
34-
- name: bench
35-
run: |
36-
echo "$ make bench" >> results.comment
37-
make bench 2>&1 | tee bench.out
38-
cat bench.out >> results.comment
39-
echo '```' >> results.comment
40-
41-
- name: results
42-
uses: thollander/actions-comment-pull-request@v2
43-
with:
44-
comment_tag: results
45-
filePath: results.comment
22+
make all
4623

.github/workflows/pr.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: pr
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
env:
8+
GO_VERSION: 1.22.2
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/setup-go@v2
15+
with:
16+
go-version: ${{ env.GO_VERSION }}
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- name: test
21+
run: |
22+
echo '```' > results.comment
23+
echo "$ make test" >> results.comment
24+
make test 2>&1 | tee test.out
25+
cat test.out | tail -20 >> results.comment
26+
echo "-----" >> results.comment
27+
28+
- name: test-race
29+
run: |
30+
make test-race
31+
- name: bench
32+
run: |
33+
echo "$ make bench" >> results.comment
34+
make bench 2>&1 | tee bench.out
35+
cat bench.out >> results.comment
36+
echo '```' >> results.comment
37+
38+
- name: results
39+
uses: thollander/actions-comment-pull-request@v2
40+
with:
41+
comment_tag: results
42+
filePath: results.comment
43+

0 commit comments

Comments
 (0)