-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 935 Bytes
/
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
name: goamqp
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
tests:
runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq
env:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: password
ports:
- 5672:5672
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
- name: Tests
run: |
go test -p 1 -mod=readonly -race -v -tags integration -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
go tool cover -func=coverage.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
fail_ci_if_error: true
flags: tests
verbose: true