ci: use npm cache too

This commit is contained in:
Harvey Tindall
2025-12-09 17:43:04 +00:00
parent aa75305da4
commit ce6f8b41dc
2 changed files with 13 additions and 1 deletions

View File

@@ -17,6 +17,10 @@ steps:
JFA_GO_SNAPSHOT: y
JFA_GO_BUILT_BY:
from_secret: BUILT_BY
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- npm i
- make precompile
@@ -30,6 +34,7 @@ steps:
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- make test
- name: build
@@ -42,6 +47,7 @@ steps:
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- curl -sfL https://goreleaser.com/static/run > ../goreleaser
- chmod +x ../goreleaser

View File

@@ -18,8 +18,12 @@ steps:
JFA_GO_SNAPSHOT: y
JFA_GO_BUILT_BY:
from_secret: BUILT_BY
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- npm i
- npm ci --cache /npm --prefer-offline
- make precompile
- go mod download
- name: test
@@ -31,6 +35,7 @@ steps:
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- make test
- name: build
@@ -42,6 +47,7 @@ steps:
volumes:
- jfa-go-build-cache:/root/.cache/go-build
- jfa-go-mod-cache:/go/pkg/mod
- jfa-go-npm-cache:/npm
commands:
- curl -sfL https://goreleaser.com/static/run > goreleaser
- chmod +x goreleaser