-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (54 loc) · 1.25 KB
/
main.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
52
53
54
55
56
---
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
core:
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
platform: [ubuntu-latest]
name: Build
runs-on: ${{ matrix.platform }}
env:
GOBIN: /home/runner/.local/bin
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Amend Environment Path
run: |
mkdir -p /home/runner/.local/bin
echo "/home/runner/.local/bin" >> $GITHUB_PATH
- name: Install prerequisites
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install make
sudo apt-get --assume-yes install libnss3-tools
- name: Install Go modules
run: |
mkdir -p .coverage
make dep
go mod tidy
go mod verify
go mod download
- name: Run tests
run: |
make
- name: Run tests
run: |
make test
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: Test Coverage Report
path: .coverage/coverage.html