-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (60 loc) · 1.49 KB
/
tests.yaml
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
name: "Build/Tests"
on:
push:
branches:
- master
- main
- 'release/**'
pull_request:
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build
env:
DRAND_TEST_LOGS: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}"
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make db-migration
test:
runs-on: ubuntu-latest
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: go get -v -t -d ./...
- name: Unit tests
env:
DRAND_TEST_LOGS: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}"
run: make test-unit
- name: Integration tests
env:
DRAND_TEST_LOGS: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}"
run: make test-integration
coverage:
runs-on: ubuntu-latest
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: make coverage
env:
DRAND_TEST_LOGS: "${{ runner.debug == '1' && 'DEBUG' || 'INFO' }}"
- run: bash <(curl -s https://codecov.io/bash)