Skip to content

Commit

Permalink
test: add workflow cache.
Browse files Browse the repository at this point in the history
fix: install the tool binaries.
  • Loading branch information
x86taka committed Jul 23, 2024
1 parent a93edb3 commit 6f2fd8c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,39 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
- name: asdf cache
id: asdf_cache_id
uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }}
restore-keys: |
${{ runner.os }}-asdf-
- name: install asdf & tools
if: steps.asdf_cache_id.outputs.cache-hit != 'true'
uses: asdf-vm/actions/install@v3.0.2
- name: asdf go cache
id: asdf_go_cache_id
uses: actions/cache@v4
with:
path: ~/.asdf/installs/golang
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-asdf-go-
- name: go mod tidy and install
if: steps.asdf_go_cache_id.outputs.cache-hit != 'true'
run: |
go mod tidy
make install-go-tools
- name: go mod cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: build
run: make build
- name: testing
Expand Down

0 comments on commit 6f2fd8c

Please sign in to comment.