Updated golang versions for CI #147
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: go-build | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
name: build ( ${{ matrix.go }} ), test, lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.21', '1.20', '1.19' ] | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Build | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go build . | |
- name: Install golangci-lint | |
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0 | |
- name: Run golangci-lint | |
run: golangci-lint run -E golint -E gosec -E gofmt | |
- name: Test | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go test -v -race -coverprofile=coverage.out ./... | |
- name: convert to lcov | |
if: ${{ matrix.go }} == '1.15' | |
run: | | |
go get -u github.com/jandelgado/gcov2lcov | |
gcov2lcov -infile=coverage.out -outfile=coverage.lcov | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
if: ${{ matrix.go }} == '1.15' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov | |
build-opencencus-check-listener: | |
name: build ( ${{ matrix.go }} ), test, lint for opencensus | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.15', '1.14', '1.13' ] | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Build | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: cd opencensus && go build . | |
- name: Install golangci-lint | |
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0 | |
- name: Run golangci-lint | |
run: cd opencensus && golangci-lint run -E golint -E gosec -E gofmt | |
- name: Test | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: cd opencensus && go test -v -race -coverprofile=coverage.out ./... |