Skip to content

Commit

Permalink
Improve Go workflows (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 committed Sep 6, 2022
1 parent 93dc120 commit af87d1b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 40 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/build.yml
Expand Up @@ -23,18 +23,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Restore Cache
uses: actions/cache@v3
with:
path: |-
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ matrix.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: 'go.mod'
cache: true
- name: Run tests
run: make test
- name: Run build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: Install TFLint
run: curl -sL https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Install plugin (Linux)
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/generated_code_checks.yml
Expand Up @@ -13,17 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Restore Cache
uses: actions/cache@v3
with:
path: |-
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: 'go.mod'
cache: true
- name: go generate and diff checks
run: go generate ./... && git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version-file: 'go.mod'
- name: goreleaser check
uses: goreleaser/goreleaser-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintenance.yaml
Expand Up @@ -13,7 +13,7 @@ jobs:
submodules: true
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version-file: 'go.mod'
- run: |
go get github.com/aws/aws-sdk-go
go mod tidy
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/release.yml
Expand Up @@ -18,18 +18,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Restore Cache
uses: actions/cache@v3
with:
path: |-
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version-file: 'go.mod'
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down

0 comments on commit af87d1b

Please sign in to comment.