protobuf-go/.github/workflows/test.yml
Kir Kolyshkin 147729ae80 gha-ci: bump Go version, nits
1. Switch from Go 1.16 to Go 1.x (which should now resolve to Go 1.18.1).

2. Add a comment explaining that the above version is not the actual Go
   version used for testing.

3. Drop -mod=vendor as this is the unconditional default since Go 1.16
   (unless GO111MODULES overrides this).

4. While at it, fix the options order in go test command, putting options
   before the file name.

Tested at https://github.com/kolyshkin/protobuf-go/actions/runs/2342081396

Change-Id: Icc9aa47ddc0d04abb69b48fcb6b021e3e8a98df3
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/406954
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Lasse Folger <lassefolger@google.com>
2022-05-23 06:49:14 +00:00

29 lines
929 B
YAML

on: [push]
name: Test
jobs:
test:
strategy:
matrix:
# This is just a version to compile the integration_test.go; see
# golangVersions in that file for the list of actual Go versions used.
go-version: [1.x]
os: [ubuntu-latest] # TODO: Add [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: sudo apt-get -y install autoconf automake libtool curl make g++ unzip
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: .cache
key: ${{ runner.os }}-${{ hashFiles('integration_test.go') }}
- name: Test
run: go test -v -timeout=60m -count=1 -failfast integration_test.go