Test Go caching #1160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Go caching | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
schedule: | |
- cron: "10 */6 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
go: | |
strategy: | |
matrix: | |
go-version: [1.23.x] | |
runs-on: | |
- namespace-profile-e2e-small | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache: false | |
- name: Check existing directories | |
run: | | |
ls -al /home/runner/go | |
- name: Setup Go cache | |
uses: ./ # Uses an action in the root directory | |
with: | |
cache: go | |
- name: Run a Go build | |
run: | | |
go install namespacelabs.dev/foundation/cmd/ns@latest | |
- name: Print cache metadata file | |
run: cat /cache/.ns/cache-metadata.json | |
- name: Breakpoint on failure | |
if: failure() && github.ref_name == 'main' | |
uses: namespacelabs/breakpoint-action@v0 | |
with: | |
duration: 15m | |
authorized-users: edganiukov,hugosantos,n-g,htr,nichtverstehen,gmichelo |