|
@@ -16,11 +16,11 @@ jobs:
|
|
|
strategy:
|
|
|
matrix:
|
|
|
os: [ubuntu, macos, windows]
|
|
|
- go-version: [1.17.x]
|
|
|
+ go-version: [1.16.x]
|
|
|
include:
|
|
|
# Test old supported Go version
|
|
|
- os: ubuntu
|
|
|
- go-version: 1.16.x
|
|
|
+ go-version: 1.15.x
|
|
|
env:
|
|
|
ELVISH_TEST_TIME_SCALE: 20
|
|
|
runs-on: ${{ matrix.os }}-latest
|
|
@@ -51,10 +51,10 @@ jobs:
|
|
|
if: matrix.os == 'ubuntu'
|
|
|
run: echo ostype=linux >> $GITHUB_ENV
|
|
|
- name: Generate test coverage
|
|
|
- if: matrix.go-version == '1.17.x'
|
|
|
+ if: matrix.go-version == '1.16.x'
|
|
|
run: go test -coverprofile=cover -coverpkg=./pkg/... ./pkg/...
|
|
|
- name: Save test coverage
|
|
|
- if: matrix.go-version == '1.17.x'
|
|
|
+ if: matrix.go-version == '1.16.x'
|
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|
|
|
name: cover-${{ env.ostype }}
|
|
@@ -72,7 +72,7 @@ jobs:
|
|
|
- name: Set up Go
|
|
|
uses: actions/setup-go@v2
|
|
|
with:
|
|
|
- go-version: 1.17.x
|
|
|
+ go-version: 1.16.x
|
|
|
- name: Run benchmarks
|
|
|
run: go test -bench=. -run='^$' ./...
|
|
|
|
|
@@ -108,12 +108,12 @@ jobs:
|
|
|
path: |
|
|
|
~/go/pkg/mod
|
|
|
~/.cache/go-build
|
|
|
- key: buildall/${{ matrix.os }}/1.17.x/${{ hashFiles('go.sum') }}/${{ github.sha }}
|
|
|
- restore-keys: buildall/${{ matrix.os }}/1.17.x/${{ hashFiles('go.sum') }}
|
|
|
+ key: buildall/${{ matrix.os }}/1.16.x/${{ hashFiles('go.sum') }}/${{ github.sha }}
|
|
|
+ restore-keys: buildall/${{ matrix.os }}/1.16.x/${{ hashFiles('go.sum') }}
|
|
|
- name: Set up Go
|
|
|
uses: actions/setup-go@v2
|
|
|
with:
|
|
|
- go-version: 1.17.x
|
|
|
+ go-version: 1.16.x
|
|
|
- name: Build binaries
|
|
|
# TODO: Use PR number for suffix when running for PR
|
|
|
run: ELVISH_REPRODUCIBLE=dev ./tools/buildall.sh . bin HEAD
|
|
@@ -132,7 +132,7 @@ jobs:
|
|
|
- name: Set up Go
|
|
|
uses: actions/setup-go@v2
|
|
|
with:
|
|
|
- go-version: 1.17.x
|
|
|
+ go-version: 1.16.x
|
|
|
- name: Set up goimports
|
|
|
run: go install golang.org/x/tools/cmd/goimports@latest
|
|
|
- name: Check style
|
|
@@ -179,7 +179,7 @@ jobs:
|
|
|
- name: Set up Go
|
|
|
uses: actions/setup-go@v2
|
|
|
with:
|
|
|
- go-version: 1.17.x
|
|
|
+ go-version: 1.16.x
|
|
|
- name: Set up staticcheck
|
|
|
run: go install honnef.co/go/tools/cmd/staticcheck@2021.1
|
|
|
- name: Run linters
|