Merge pull request #2214 from Shopify/dnwe/handle-offsets-load-in-pro… #26
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: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
name: Linting with Go ${{ matrix.go-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.17.x, 1.18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: golangci-lint | |
env: | |
GOFLAGS: -tags=functional | |
uses: golangci/golangci-lint-action@v2 | |
with: | |
version: v1.45.2 | |
test: | |
name: Unit Testing with Go ${{ matrix.go-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.17.x, 1.18.x] | |
env: | |
DEBUG: true | |
GOFLAGS: -trimpath | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Get Go environment | |
id: go-env | |
run: | | |
echo "::set-output name=cache::$(go env GOCACHE)" | |
echo "::set-output name=modcache::$(go env GOMODCACHE)" | |
- name: Set up cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
${{ steps.go-env.outputs.cache }} | |
${{ steps.go-env.outputs.modcache }} | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Test (Unit) | |
run: make test |