Skip to content

Update golang dependencies (#700) #978

Update golang dependencies (#700)

Update golang dependencies (#700) #978

Workflow file for this run

name: Check prerequisites
on: [push, pull_request]
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Checkout the repository
uses: actions/checkout@v3
# Comment this out for now until amppackager passes goimports.
# https://github.com/ampproject/amppackager/issues/506
# - name: Check formatting with goimports
# run: |
# if $(go env GOPATH)/bin/goimports -d . | grep . ; then
# exit 1
# fi
go-vet:
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Checkout the repository
uses: actions/checkout@v3
- name: Diagnose the code with go vet
# TODO(banaag): Turn on composite checking when
# https://github.com/ampproject/amppackager/issues/507 is fixed.
run: go vet -composites=false ./...
go-test:
runs-on: ubuntu-latest
steps:
- name: Setup Go 1.19
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Checkout the repository
uses: actions/checkout@v3
- name: Run the tests
run: make test
- name: Run the build
run: make build