Skip to content

All: Refactor to Discovery v3 #466

All: Refactor to Discovery v3

All: Refactor to Discovery v3 #466

Workflow file for this run

name: "Test & check build"
on: [push, pull_request]
jobs:
fmt-go:
name: Check format Go
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ^1.18
- uses: actions/checkout@v3
- name: Install Gofumpt
run: go install mvdan.cc/gofumpt@latest
- name: Check fmt using Gofumpt
run: |
files=$(~/go/bin/gofumpt -l -d .);
if [[ -n "$files" ]]; then
printf '%s\nGofumpt would make changes, install Gofumpt and run "make lint"' "$files";
exit 1;
fi
shell: bash
lint-go:
name: Lint Go
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: ^1.18
- uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
# See https://github.com/golangci/golangci-lint-action/issues/485 for why we do --out-....
with:
version: latest
args: "-E stylecheck,revive,gocritic --out-${NO_FUTURE}format colored-line-number --timeout 5m"
build-cli:
name: Build CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18
- run: make build-cli
build-gui:
name: Build GUI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18
- run: make build-gui
test-go:
name: Test Go
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18
- run: make test