Skip to content

feat: add new flags and apache 2.0 license #20

feat: add new flags and apache 2.0 license

feat: add new flags and apache 2.0 license #20

Workflow file for this run

name: Build and Test Go
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- .github/workflows/build-go.yaml
- '**/*.go'
pull_request:
branches:
- main
paths:
- .github/workflows/build-go.yaml
- '**/*.go'
permissions:
contents: read
defaults:
run:
working-directory: ./advisor
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: ./advisor
args: --timeout=5m
build:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
go-version: [ '1.21.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get -v ./...
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test -v ./... > test-results-${{ matrix.go-version }}.json
- name: Upload Go test results
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.go-version }}
path: test-results-${{ matrix.go-version }}.json