mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-03 15:02:35 +02:00
chore(actions): cache Golang packages (#1824)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
parent
116a91ce28
commit
7afc4cb60e
31
.github/workflows/verify-go.yml
vendored
31
.github/workflows/verify-go.yml
vendored
@ -15,6 +15,13 @@ jobs:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: Cache Golang Packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-golang-${{ hashFiles('go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-golang-
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: unit-test
|
||||
@ -25,6 +32,14 @@ jobs:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: Cache Golang Packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-golang-format${{ hashFiles('go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-golang-format
|
||||
${{ runner.os }}-golang-
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: format
|
||||
@ -37,6 +52,14 @@ jobs:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: Cache Golang Packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-golang-generate${{ hashFiles('go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-golang-generate
|
||||
${{ runner.os }}-golang-
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: generate
|
||||
@ -49,6 +72,14 @@ jobs:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.x'
|
||||
- name: Cache Golang Packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-golang-dependencies${{ hashFiles('go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-golang-dependencies
|
||||
${{ runner.os }}-golang-
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: cleanup dependencies
|
||||
|
Loading…
x
Reference in New Issue
Block a user