From e3a9ac5b171f5fb4a22f7ef8074e6dc9cbac17a2 Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 17 Oct 2020 11:59:25 -0700 Subject: [PATCH 1/4] restore cache on all but ubuntu and latest go --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f9dbbc680..74f569c58 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -18,7 +18,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Restore Cache - if: matrix.os != 'ubuntu-latest' && matrix.go-version != '1.15.x' + if: matrix.os != 'ubuntu-latest' || matrix.go-version != '1.15.x' uses: actions/cache@v2 with: path: ~/go/pkg/mod From ce708b121ef73fad008dc7c1cd85ad3768d2b52f Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 17 Oct 2020 12:05:26 -0700 Subject: [PATCH 2/4] move linting to separate job --- .github/workflows/workflow.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 74f569c58..3d7ee0e12 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,8 +17,10 @@ jobs: with: go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Restore Cache - if: matrix.os != 'ubuntu-latest' || matrix.go-version != '1.15.x' uses: actions/cache@v2 with: path: ~/go/pkg/mod @@ -26,15 +28,6 @@ jobs: restore-keys: | ${{ runner.os }}-v1-go- - - name: Checkout code - uses: actions/checkout@v2 - - - name: lint - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x' - uses: golangci/golangci-lint-action@v2 - with: - version: v1.31 - - name: Test run: go test -race -covermode=atomic -coverprofile="profile.cov" ./... @@ -43,3 +36,13 @@ jobs: uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov + +golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.31 From 793791d72b27af98dbe7637f763e325c0466482d Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 17 Oct 2020 12:05:59 -0700 Subject: [PATCH 3/4] fix yaml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3d7ee0e12..f04f186b7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -18,7 +18,7 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v2 - name: Restore Cache uses: actions/cache@v2 From 96d7f70a71f9deb73ad264e77f5efcfe58d4514e Mon Sep 17 00:00:00 2001 From: Dean Karn Date: Sat, 17 Oct 2020 12:06:54 -0700 Subject: [PATCH 4/4] fix indentation --- .github/workflows/workflow.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index f04f186b7..0025ea0c1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -37,12 +37,12 @@ jobs: with: path-to-profile: profile.cov -golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: v1.31 + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.31