-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 995 Bytes
/
go.yml
File metadata and controls
45 lines (34 loc) · 995 Bytes
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
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Download dependencies
run: go mod download
- name: Run unit tests
if: matrix.os != 'ubuntu-latest'
run: go test -race ./...
- name: Run unit tests with coverage
if: matrix.os == 'ubuntu-latest'
run: go test -race -coverprofile=coverage.out ./...
- name: Build
run: go build -v -o flashduty-runner ./cmd
- name: Upload coverage
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
files: coverage.out
fail_ci_if_error: false