-
Notifications
You must be signed in to change notification settings - Fork 979
72 lines (67 loc) · 1.7 KB
/
tests.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Tests
on:
push:
branches-ignore:
- 'tmp-*'
pull_request:
branches-ignore:
- 'tmp-*'
jobs:
tests:
name: CI
runs-on: ubuntu-latest
services:
mysql:
image: 'mysql:5.7'
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 3306:3306
redis:
image: 'redis'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 6379:6379
postgres:
image: 'yedf/postgres-xa'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
env:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: dtm
ports:
- '5432:5432'
mongo:
image: 'yedf/mongo-rs'
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
ports:
- 27017:27017
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: '1.19.3'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go mod download
- name: Run CI lint
run: sh helper/golint.sh
- name: Run test cover
run: sh helper/test-cover.sh
- name: Upload to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)