-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.23 KB
/
go.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
on:
push:
branches:
- main
pull_request:
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Checkout code
uses: actions/checkout@v4
- name: Bootstrap
run: go install ./cmd/dawn
- name: Restore cache
uses: actions/cache/restore@v3
with:
path: .dawn/build
key: dawn-build-${{ github.ref }}
- name: Build
run: dawn
- name: Save cache
uses: actions/cache/save@v3
with:
path: .dawn/build
key: dawn-build-${{ github.ref }}
- name: Test
run: go test ./... -coverprofile=coverage.out
- name: Upload coverage data
if: ${{ matrix.os != 'windows-latest' }}
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
fail_ci_if_error: true
verbose: true
env_vars: OS
token: ${{ secrets.CODECOV_TOKEN }}