Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Improve Go workflows #371

Merged
merged 1 commit into from Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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