forked from nimajalali/go-force
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.11 KB
/
build.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
on: [pull_request, push]
name: build
jobs:
build-test:
strategy:
matrix:
go-version: ["1.21.13", 1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go mod download
- name: Test with Go
run: go test -cover -json ./... > TestResults-${{ matrix.os }}-${{ matrix.go-version }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
name: Go-results-${{ matrix.os }}-${{ matrix.go-version }}
path: TestResults-${{ matrix.os }}-${{ matrix.go-version }}.json
# - name: Update coverage report
# uses: ncruces/go-coverage-report@v0
# with:
# report: true
# chart: true
# amend: true
# if: |
# matrix.os == 'ubuntu-latest' &&
# github.event_name == 'push'
# continue-on-error: true