This repository was archived by the owner on Dec 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.44 KB
/
Copy pathci.yml
File metadata and controls
60 lines (53 loc) · 1.44 KB
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
57
58
59
60
name: "CI"
# There's no need to run the workflow on every commit,
# so it only runs on final changes.
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
env:
# Use latest stable version.
GO_VERSION: "stable"
jobs:
coverage:
name: "Check coverage"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: "Generate reports"
run: cd fext && go test -race ./... -coverprofile=coverage.out -covermode=atomic
- name: "Upload reports to Codecov"
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test:
# Test how compilation and tests pass on different platforms and versions of Go.
name: "Test on version"
# The important thing is not the version of the platform it will run on,
# but rather the platform itself.
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- ubuntu
- windows
# macOS promises to someday appear here...
go-version:
- "1.22"
- "1.21"
- "1.20"
- "1.19"
- "1.18"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: "Test application"
run: cd fext && go test -race ./...