Skip to content

Commit

Permalink
🚧 Set Go cache to false, introduce custom cache
Browse files Browse the repository at this point in the history
The path is set to the newly introduced GOPATH that is set as an environment variable, and the key for the cache is set to `setup.py`, `pyproject.toml` – this can be further refined by setting a different file for the Hugo SHA-256 hash and the version of Hugo being installed.
  • Loading branch information
agriyakhetarpal committed Jan 2, 2024
1 parent f2d722f commit ce6def8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.12"]
go-version: ["1.20.12", "1.21.5"]
go-version: ["1.20.x", "1.21.x"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -39,6 +39,8 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
check-latest: true

- name: Install GCC on Linux
if: matrix.runs-on == 'ubuntu-latest'
Expand All @@ -48,6 +50,12 @@ jobs:
if: matrix.runs-on == 'windows-latest'
run: choco install mingw

- name: Restore Hugo builder cache
uses: actions/cache@v3.3.2
with:
path: ./hugo_cache/
key: ${{ runner.os }}-${{ matrix.go-version }}-hugo-build-cache-${{ hashFiles('**/setup.py', '**/pyproject.toml') }}

- name: Install Python dependencies
run: python -m pip install build virtualenv nox

Expand Down

0 comments on commit ce6def8

Please sign in to comment.