Developer: Github Actions should use cache steps (#1097)

* Add cache steps

* Add name property to cache step

* Remove bad copy & paste

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Chris Hunt 2021-03-28 13:41:47 -04:00 committed by GitHub
parent b0fd111ea2
commit b081ba13cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,13 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build binaries
run: go run build/build.go
- name: Run unit tests
@ -135,6 +142,13 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: ^1.15
- name: Cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Determining test viability for ${{ matrix.provider }} provider
run: if [ -n "$${{ matrix.provider }}_DOMAIN" ] ; then echo "CAN_CONTINUE=yes" >> "$GITHUB_ENV" ; fi
- name: Run integration tests for ${{ matrix.provider }} provider