test: extend caches for build (#686)

* test: extend caches for build

* Update caching strategy in Go workflow

* Remove extra whitespace in go.yml
This commit is contained in:
Marc Brugger
2025-10-26 17:15:30 +01:00
committed by GitHub
parent 25e7aeeecb
commit 57f8938ccc
3 changed files with 17 additions and 20 deletions

View File

@@ -22,12 +22,11 @@ jobs:
with:
go-version-file: "go.mod"
- 'name': 'Set up tools cache'
'uses': 'actions/cache@v4'
'with':
'path': "${{ github.workspace }}/bin"
'key': "${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}"
'restore-keys': '${{ runner.os }}-${{ github.job }}-tools-'
- name: Cache toolbox binaries
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/bin
key: ${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}
- name: Lint
run: make lint
@@ -38,7 +37,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check out code into the Go module directory
@@ -49,12 +47,11 @@ jobs:
with:
go-version-file: "go.mod"
- 'name': 'Set up tools cache'
'uses': 'actions/cache@v4'
'with':
'path': "${{ github.workspace }}/bin"
'key': "${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}"
'restore-keys': '${{ runner.os }}-${{ github.job }}-tools-'
- name: Cache toolbox binaries
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/bin
key: ${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}
- name: Model
run: make model
@@ -82,12 +79,11 @@ jobs:
with:
go-version-file: "go.mod"
- 'name': 'Set up tools cache'
'uses': 'actions/cache@v4'
'with':
'path': "${{ github.workspace }}/bin"
'key': "${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}"
'restore-keys': '${{ runner.os }}-${{ github.job }}-tools-'
- name: Cache toolbox binaries
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/bin
key: ${{ runner.os }}-${{ github.job }}-tools-${{ hashFiles('.toolbox.mk') }}
- name: Run GoReleaser
run: make test-release

View File

@@ -1,3 +1,4 @@
## toolbox - start
## Generated with https://github.com/bakito/toolbox

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/bakito/adguardhome-sync
go 1.25.1
go 1.25.3
require (
github.com/caarlos0/env/v11 v11.3.1