From 8d8a3aae9e56552408e58e6baf53d07f9a560855 Mon Sep 17 00:00:00 2001 From: reeseconor Date: Thu, 22 Oct 2020 14:06:31 -0600 Subject: [PATCH 1/2] Add support for caching dependencies between GitHub Action runs --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67d1dbf0..478df152 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,14 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - - name: Format + - name: Restore cache + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- - name: Format + - name: Format run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi if: matrix.os == 'ubuntu-latest' - name: Test From 387efb7ae897e4089d8cc628b94be2c304e02004 Mon Sep 17 00:00:00 2001 From: Ben Tranter Date: Fri, 30 Oct 2020 17:24:53 -0400 Subject: [PATCH 2/2] Update .github/workflows/ci.yml (Going to commit this to get this merged within the Hacktoberfest deadline) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 478df152..ed091b85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go- - name: Format + ${{ runner.os }}-go- - name: Format run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi if: matrix.os == 'ubuntu-latest'