From 57f8938cccd8787ec7a8f6cd1c8efc061366ffea Mon Sep 17 00:00:00 2001 From: Marc Brugger Date: Sun, 26 Oct 2025 17:15:30 +0100 Subject: [PATCH] test: extend caches for build (#686) * test: extend caches for build * Update caching strategy in Go workflow * Remove extra whitespace in go.yml --- .github/workflows/go.yml | 34 +++++++++++++++------------------- .toolbox.mk | 1 + go.mod | 2 +- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9f23a72..6177bbd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 diff --git a/.toolbox.mk b/.toolbox.mk index 6ffb580..7ef63da 100644 --- a/.toolbox.mk +++ b/.toolbox.mk @@ -1,3 +1,4 @@ + ## toolbox - start ## Generated with https://github.com/bakito/toolbox diff --git a/go.mod b/go.mod index ade262c..6c39385 100644 --- a/go.mod +++ b/go.mod @@ -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