-
Notifications
You must be signed in to change notification settings - Fork 195
56 lines (47 loc) · 1.27 KB
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Run Testing
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
# Label of the container job
runner-job:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.19, "1.20", 1.21]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 4
- name: Start MongoDB 4.2
uses: supercharge/[email protected]
with:
mongodb-version: 4.2
- name: Start PostgreSQL 14
uses: harmon758/postgresql-action@v1
with:
postgresql db: testdb
postgresql user: testuser
postgresql password: testpw
postgresql version: "14"
- uses: niden/actions-memcached@v7
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Run Tests
run: |
go test -v -covermode=atomic -coverprofile=coverage.out ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3