feat: use pnpm
This commit is contained in:
74
.drone.yml
74
.drone.yml
@ -34,18 +34,19 @@ steps:
|
||||
# endpoint: https://s3.fr-par.scw.cloud
|
||||
# region: fr-par
|
||||
# path_style: true
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||
# mount:
|
||||
# - '.cache'
|
||||
|
||||
- name: dependencies
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||
commands:
|
||||
- yarn --frozen-lockfile --network-timeout 100000
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm install --fetch-timeout 100000
|
||||
# depends_on:
|
||||
# - restore-cache
|
||||
|
||||
@ -63,47 +64,52 @@ steps:
|
||||
# endpoint: https://s3.fr-par.scw.cloud
|
||||
# region: fr-par
|
||||
# path_style: true
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||
# mount:
|
||||
# - '.cache'
|
||||
# depends_on:
|
||||
# - dependencies
|
||||
|
||||
- name: lint
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
commands:
|
||||
- yarn run lint
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm run lint
|
||||
depends_on:
|
||||
- dependencies
|
||||
|
||||
- name: build-prod
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
commands:
|
||||
- yarn build
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm run build
|
||||
depends_on:
|
||||
- dependencies
|
||||
|
||||
- name: test-unit
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
commands:
|
||||
- yarn test:unit
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm run test:unit
|
||||
depends_on:
|
||||
- dependencies
|
||||
|
||||
- name: typecheck
|
||||
failure: ignore
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
environment:
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
commands:
|
||||
- yarn typecheck
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm run typecheck
|
||||
depends_on:
|
||||
- dependencies
|
||||
|
||||
@ -113,20 +119,21 @@ steps:
|
||||
environment:
|
||||
CYPRESS_API_URL: http://api:3456/api/v1
|
||||
CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
|
||||
CYPRESS_RECORD_KEY:
|
||||
from_secret: cypress_project_key
|
||||
commands:
|
||||
- sed -i 's/localhost/api/g' dist/index.html
|
||||
- yarn serve:dist & npx wait-on http://localhost:4173
|
||||
- yarn test:frontend --browser chrome --record
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm run serve:dist & npx wait-on http://localhost:4173
|
||||
- pnpm run test:frontend --browser chrome --record
|
||||
depends_on:
|
||||
- build-prod
|
||||
|
||||
- name: deploy-preview
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
environment:
|
||||
NETLIFY_AUTH_TOKEN:
|
||||
@ -139,6 +146,7 @@ steps:
|
||||
- cp -r dist dist-preview
|
||||
# Override the default api url used for preview
|
||||
- sed -i 's|localhost:3456|try.vikunja.io|g' dist-preview/index.html
|
||||
- apk add --no-cache perl-utils
|
||||
- shasum -a 384 -c ./scripts/deploy-preview-netlify.js.sha384
|
||||
- node ./scripts/deploy-preview-netlify.js
|
||||
depends_on:
|
||||
@ -181,21 +189,22 @@ steps:
|
||||
# endpoint: https://s3.fr-par.scw.cloud
|
||||
# region: fr-par
|
||||
# path_style: true
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||
# mount:
|
||||
# - '.cache'
|
||||
|
||||
- name: build
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
group: build-static
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
commands:
|
||||
- yarn --frozen-lockfile --network-timeout 100000
|
||||
- yarn run lint
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnp
|
||||
- pnpm install --fetch-timeout 100000
|
||||
- pnpm run lint
|
||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
||||
- yarn run build
|
||||
- pnpm run build
|
||||
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
||||
# depends_on:
|
||||
# - restore-cache
|
||||
@ -256,21 +265,22 @@ steps:
|
||||
# endpoint: https://s3.fr-par.scw.cloud
|
||||
# region: fr-par
|
||||
# path_style: true
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||
# mount:
|
||||
# - '.cache'
|
||||
|
||||
- name: build
|
||||
image: node:18
|
||||
image: node:18-alpine
|
||||
pull: true
|
||||
group: build-static
|
||||
environment:
|
||||
YARN_CACHE_FOLDER: .cache/yarn/
|
||||
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||
commands:
|
||||
- yarn --frozen-lockfile --network-timeout 100000
|
||||
- yarn run lint
|
||||
- corepack enable && corepack prepare pnpm@7.9.3 --activate && pnpm config set store-dir .cache/.pnpm
|
||||
- pnpm install --fetch-timeout 100000
|
||||
- pnpm run lint
|
||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
||||
- yarn run build
|
||||
- pnpm run build
|
||||
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
||||
# depends_on:
|
||||
# - restore-cache
|
||||
|
Reference in New Issue
Block a user