Update golang dependencies #1821
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: Check prerequisites | |
on: [push, pull_request] | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Go 1.19 | |
uses: actions/setup-go@v5 | |
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@v4 | |
# 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@v5 | |
with: | |
go-version: '1.19' | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- 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@v5 | |
with: | |
go-version: '1.19' | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Run the tests | |
run: make test | |
- name: Run the build | |
run: make build |