ci: cache and prefetch WebDrop dependencies

This commit is contained in:
justme committed 2026-10-02 04:18:41 +00:00
1 parent a182043970
commit 3332e7bbcf
1 file changed
+40 -28
+40 -28
View File
@@ -1,45 +1,57 @@
when: when:
- event: [push, manual] - event: [push, manual]
labels: labels:
ci: domain-linux-native ci: domain-linux-native
platform: linux/amd64 platform: linux/amd64
clone: clone:
- name: git - name: git
image: woodpeckerci/plugin-git:2.9.3 image: woodpeckerci/plugin-git:2.9.3
settings: settings:
remote: remote:
from_secret: gitea_clone_webdrop from_secret: gitea_clone_webdrop
lfs: false lfs: false
steps: steps:
api-contract: prefetch-dependencies:
image: bash image: bash
commands: commands:
- node scripts/check-api-contract.mjs - mkdir -p "$HOME/.cache/woodpecker/webdrop/npm" "$HOME/.cache/woodpecker/webdrop/nuget"
- cd packages/core
- npm ci --cache "$HOME/.cache/woodpecker/webdrop/npm" --prefer-offline --no-audit
- cd ../../web
- npm ci --cache "$HOME/.cache/woodpecker/webdrop/npm" --prefer-offline --no-audit
- cd ..
- NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet restore server/WebDrop.slnx
api-contract:
image: bash
commands:
- node scripts/check-api-contract.mjs
core-and-web: core-and-web:
image: bash image: bash
depends_on: [prefetch-dependencies]
commands: commands:
- cd packages/core - cd packages/core
- npm ci
- npm run typecheck - npm run typecheck
- npm test - npm test
- npm run vectors:check - npm run vectors:check
- npm run build - npm run build
web: web:
image: bash image: bash
depends_on: [prefetch-dependencies]
commands: commands:
- cd web - cd web
- npm ci
- npm run typecheck - npm run typecheck
- npm run lint:css - npm run lint:css
- npm test - npm test
- npm run build - npm run build
server: server:
image: bash image: bash
depends_on: [prefetch-dependencies]
commands: commands:
- dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal - NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal --no-restore