-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 876 Bytes
/
test.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
name: Test and coverage
on:
push:
paths:
- '**.go'
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18
- name: install vault
run: |
curl -O https://releases.hashicorp.com/vault/1.13.0/vault_1.13.0_linux_amd64.zip
unzip vault_1.13.0_linux_amd64.zip
sudo mv vault /usr/bin/.
mkdir assets/raft
vault server -config assets/vault-cfg.hcl &
- name: go get
run: go get ./...
- name: go mod tidy
run: go mod tidy
- name: Run coverage
run: go test -v -race -coverprofile="coverage.out" -covermode=atomic ./...
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)