-
Notifications
You must be signed in to change notification settings - Fork 14
54 lines (50 loc) · 1.42 KB
/
dev.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
# SPDX-License-Identifier: Apache-2.0
name: PR Build Check
on: [push, pull_request]
permissions:
contents: read
jobs:
golangci:
name: Code Linting (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
build:
name: Build and Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install go
uses: actions/setup-go@v3
with:
go-version: '>=1.18'
cache: true
- name: Build
run: go build ./...
- name: Run Tests
if: runner.os != 'Linux'
run: go test -v ./...
- name: Run Tests with Coverage
if: runner.os == 'Linux'
run: go test -v -coverprofile=coverage.out $(go list ./... | grep -v /proto)
- name: Upload coverage to Codecov
if: runner.os == 'Linux' && github.repository == 'substrait-io/substrait-go'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
file: ./coverage.out
fail_ci_if_error: true