mirror of
https://github.com/robertkrimen/otto
synced 2025-10-12 20:27:30 +08:00
ci: use setup-go caching (#448)
Use setup-go caching instead of manually rolled version. Also: * Bump golangci-lint to 1.50.1. * Add go 1.19 to test / lint matrix. * Bump timeout to 6 mins.
This commit is contained in:
parent
93072360ee
commit
ba066df8fc
32
.github/workflows/test-lint.yml
vendored
32
.github/workflows/test-lint.yml
vendored
|
@ -8,36 +8,19 @@ jobs:
|
|||
go-test-lint:
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.18]
|
||||
golangcli: [v1.50.0]
|
||||
go: [1.19, 1.18]
|
||||
golangcli: [v1.50.1]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Go Cache Paths
|
||||
id: go-cache-paths
|
||||
run: |
|
||||
echo "::set-output name=go-build::$(go env GOCACHE)"
|
||||
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
||||
|
||||
- name: Go Build Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
||||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Go Mod Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
||||
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
||||
cache: true
|
||||
|
||||
- name: Validate go mod
|
||||
run: |
|
||||
|
@ -49,8 +32,7 @@ jobs:
|
|||
with:
|
||||
version: ${{ matrix.golangci }}
|
||||
args: "--out-${NO_FUTURE}format colored-line-number"
|
||||
skip-pkg-cache: true
|
||||
skip-build-cache: true
|
||||
skip-cache: true
|
||||
|
||||
- name: Go Build
|
||||
run: go build ./...
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
run:
|
||||
concurrency: 4
|
||||
deadline: 5m
|
||||
deadline: 6m
|
||||
skip-dirs:
|
||||
- terst
|
||||
skip-files:
|
||||
|
|
Loading…
Reference in New Issue
Block a user