-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 856 Bytes
/
ci.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
name: ci
on:
push:
branches:
- trunk
pull_request:
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: ["1.18"]
os: [ubuntu-latest,]
name: Go ${{ matrix.go }} in ${{ matrix.os }}
steps:
# Codecov requires depth >1 to be able to figure out commit SHA
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Environment
run: |
go version
go env
- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
- name: Test
env:
GOFLAGS: -mod=mod
run: go test -short -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)