Skip to content

Updates ion-tests and skip list. #562

Updates ion-tests and skip list.

Updates ion-tests and skip list. #562

Workflow file for this run

name: Go Build
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v ./...
- name: Test with coverage
run: go test -v ./... -coverprofile coverage.txt
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "^1.13"
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Checkout code
uses: actions/checkout@v3
# goimports provides a superset of gofmt functionality
- run: goimports -w .
- name: Run go mod tidy on all modules
run: go mod tidy
# If there are any diffs from goimports or go mod tidy, fail.
- name: Verify no changes from goimports and go mod tidy.
run: |
if [ -n "$(git status --porcelain)" ]; then
# Show the files that failed to pass the check.
echo 'Lint check failed:'
git diff --minimal --compact-summary
echo 'To fix this check, run "goimports -w . && go mod tidy"'
exit 1
fi