-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (35 loc) · 949 Bytes
/
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
---
name: Go
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1
- name: Install Linux deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install --no-install-recommends \
libxml2-dev libxslt1-dev liblzma-dev zlib1g-dev
- name: Install macOS deps
if: runner.os == 'macOS'
run: brew install libxml2 libxslt
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic -race ./...
- name: Coverage
if: runner.os == 'Linux'
run: bash <(curl -s https://codecov.io/bash)