-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 1.51 KB
/
ci.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
57
58
59
name: CI
on:
- push
- pull_request
jobs:
test:
strategy:
matrix:
platform:
- Linux
- macOS
- Windows
go-version:
- '1.20'
- '1.21'
- '1.22'
include:
- platform: Linux
os: ubuntu-latest
- platform: macOS
os: macos-latest
- platform: Windows
os: windows-latest
fail-fast: false
name: Go ${{ matrix.go-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Setup Git
run: git config --global core.autocrlf false
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Download modules
run: go mod download
- name: Install dependencies
run: npm install
- name: Test
run: go test -v -race -coverprofile coverage.txt ./...
- name: Vet
run: go vet ./...
- name: Test core modules
run: npm run cover
- name: Lint core modules
run: npm run lint
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: GO
fail_ci_if_error: true
flags: ${{ matrix.platform }}
env:
GO: ${{ matrix.go-version }}