Skip to content

Commit b464f4d

Browse files
committed
Include monoprocess in CI tests
1 parent f302716 commit b464f4d

File tree

1 file changed

+103
-97
lines changed

1 file changed

+103
-97
lines changed

.github/workflows/go.yml

Lines changed: 103 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Build & Test
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
concurrency:
@@ -16,116 +16,122 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v4
20-
21-
- name: Set up Go
22-
uses: actions/setup-go@v5
23-
with:
24-
go-version: 1.22
25-
check-latest: true
26-
cache: true
27-
28-
- name: Build
29-
run: go build -v ./...
30-
31-
- name: Tests
32-
run: |
33-
go install github.com/jstemmer/go-junit-report/v2@latest
34-
go test -short -timeout 120s -race -count 1 -v ./... 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
35-
36-
37-
- name: Test Summary
38-
uses: test-summary/action@v2
39-
with:
40-
paths: |
41-
${{ github.workspace }}/report.xml
42-
if: always()
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: 1.22
25+
check-latest: true
26+
cache: true
27+
28+
- name: Build
29+
run: go build -v ./...
30+
31+
- name: Tests
32+
run: |
33+
go install github.com/jstemmer/go-junit-report/v2@latest
34+
go test -short -timeout 120s -race -count 1 -v ./... 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
35+
36+
- name: Test Summary
37+
uses: test-summary/action@v2
38+
with:
39+
paths: |
40+
${{ github.workspace }}/report.xml
41+
if: always()
4342

4443
test_redis:
4544
runs-on: ubuntu-latest
4645
needs: build
4746

4847
steps:
49-
- uses: actions/checkout@v3
50-
51-
- name: Set up Go
52-
uses: actions/setup-go@v3
53-
with:
54-
go-version: 1.21
55-
check-latest: true
56-
cache: true
57-
58-
- name: Start Redis
59-
uses: shogo82148/actions-setup-redis@v1
60-
with:
61-
auto-start: true
62-
redis-port: 6379
63-
redis-version: '6.2'
64-
redis-conf: 'requirepass RedisPassw0rd'
65-
66-
- name: Tests
67-
run: |
68-
go install github.com/jstemmer/go-junit-report/v2@latest
69-
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/redis 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
70-
71-
- name: Test Summary
72-
uses: test-summary/action@v2
73-
with:
74-
paths: |
75-
${{ github.workspace }}/report.xml
76-
if: always()
48+
- uses: actions/checkout@v3
49+
50+
- name: Set up Go
51+
uses: actions/setup-go@v3
52+
with:
53+
go-version: 1.21
54+
check-latest: true
55+
cache: true
56+
57+
- name: Start Redis
58+
uses: shogo82148/actions-setup-redis@v1
59+
with:
60+
auto-start: true
61+
redis-port: 6379
62+
redis-version: "6.2"
63+
redis-conf: "requirepass RedisPassw0rd"
64+
65+
- name: Tests
66+
run: |
67+
go install github.com/jstemmer/go-junit-report/v2@latest
68+
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/redis 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
69+
70+
- name: Test Summary
71+
uses: test-summary/action@v2
72+
with:
73+
paths: |
74+
${{ github.workspace }}/report.xml
75+
if: always()
7776

7877
test_sqlite:
7978
runs-on: ubuntu-latest
8079
needs: build
8180

8281
steps:
83-
- uses: actions/checkout@v3
84-
85-
- name: Set up Go
86-
uses: actions/setup-go@v3
87-
with:
88-
go-version: 1.21
89-
check-latest: true
90-
cache: true
91-
92-
- name: Tests
93-
run: |
94-
go install github.com/jstemmer/go-junit-report/v2@latest
95-
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/sqlite 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
96-
97-
- name: Test Summary
98-
uses: test-summary/action@v2
99-
with:
100-
paths: |
101-
${{ github.workspace }}/report.xml
102-
if: always()
82+
- uses: actions/checkout@v3
83+
84+
- name: Set up Go
85+
uses: actions/setup-go@v3
86+
with:
87+
go-version: 1.21
88+
check-latest: true
89+
cache: true
90+
91+
- name: Install dependencies
92+
run: |
93+
go install github.com/jstemmer/go-junit-report/v2@latest
94+
95+
- name: Tests (sqlite)
96+
run: |
97+
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/sqlite 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
98+
99+
- name: Tests (monoprocess backend)
100+
run: |
101+
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/monoprocess 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
102+
103+
- name: Test Summary
104+
uses: test-summary/action@v2
105+
with:
106+
paths: |
107+
${{ github.workspace }}/report.xml
108+
if: always()
103109

104110
test_mysql:
105111
runs-on: ubuntu-latest
106112
needs: build
107113

108114
steps:
109-
- uses: actions/checkout@v3
110-
111-
- name: Set up Go
112-
uses: actions/setup-go@v3
113-
with:
114-
go-version: 1.21
115-
check-latest: true
116-
cache: true
117-
118-
- name: Start MySQL
119-
run: sudo /etc/init.d/mysql start
120-
121-
- name: Tests
122-
run: |
123-
go install github.com/jstemmer/go-junit-report/v2@latest
124-
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/mysql 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
125-
126-
- name: Test Summary
127-
uses: test-summary/action@v2
128-
with:
129-
paths: |
130-
${{ github.workspace }}/report.xml
131-
if: always()
115+
- uses: actions/checkout@v3
116+
117+
- name: Set up Go
118+
uses: actions/setup-go@v3
119+
with:
120+
go-version: 1.21
121+
check-latest: true
122+
cache: true
123+
124+
- name: Start MySQL
125+
run: sudo /etc/init.d/mysql start
126+
127+
- name: Tests
128+
run: |
129+
go install github.com/jstemmer/go-junit-report/v2@latest
130+
go test -timeout 120s -race -count 1 -v github.com/cschleiden/go-workflows/backend/mysql 2>&1 | go-junit-report -set-exit-code -iocopy -out "${{ github.workspace }}/report.xml"
131+
132+
- name: Test Summary
133+
uses: test-summary/action@v2
134+
with:
135+
paths: |
136+
${{ github.workspace }}/report.xml
137+
if: always()

0 commit comments

Comments
 (0)