-
Notifications
You must be signed in to change notification settings - Fork 27
53 lines (51 loc) · 1.44 KB
/
ci.yml
File metadata and controls
53 lines (51 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
name: tests
on:
push:
paths-ignore:
- 'examples/**'
tags-ignore:
- '*.*'
pull_request:
paths-ignore:
- 'examples/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Run linters
uses: golangci/golangci-lint-action@v8
with:
args: --verbose
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.22.x', '1.23.x', '1.24.x']
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install gotestsum
run: go install gotest.tools/gotestsum@v1.12.3
- name: Test
run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage reports to Codecov
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go == '1.24.x' }}
uses: codecov/codecov-action@v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
slug: fastschema/qjs