Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
switch build and test for caching alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Jan 26, 2023
1 parent 6ab301d commit c2c2e36
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,25 @@ jobs:
${{ hashFiles('go.sum') }}"
restore-keys: |
${{ env.BASE_CACHE_KEY }}
- name: Build executable file
run: go build -v ./...
- name: Run tests
run: go test -v ./...
# Cache go build cache, used to speedup go test
- name: Go Build Cache
uses: actions/cache@v2
with:
path: |
${{ steps.go-cache.outputs.dir }}
key: "${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('go.mod') }}-\
${{ hashFiles('go.sum') }}"

# Cache go mod cache, used to speedup builds
- name: Go Mod Cache
uses: actions/cache@v2
with:
path: |
${{ steps.go-cache.outputs.dir }}
key: "${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('go.mod') }}-\
${{ hashFiles('go.sum') }}"
- name: Setup tmate debug session
uses: mxschmitt/action-tmate@v3
if: env.RUN_TMATE

0 comments on commit c2c2e36

Please sign in to comment.