feat: use pnpm
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
1ce89b1440
commit
922badd4da
46
.drone.yml
46
.drone.yml
|
@ -34,7 +34,7 @@ steps:
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
# endpoint: https://s3.fr-par.scw.cloud
|
||||||
# region: fr-par
|
# region: fr-par
|
||||||
# path_style: true
|
# path_style: true
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||||
# mount:
|
# mount:
|
||||||
# - '.cache'
|
# - '.cache'
|
||||||
|
|
||||||
|
@ -42,10 +42,10 @@ steps:
|
||||||
image: node:16
|
image: node:16
|
||||||
pull: true
|
pull: true
|
||||||
environment:
|
environment:
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||||
commands:
|
commands:
|
||||||
- yarn --frozen-lockfile --network-timeout 100000
|
- pnpm install --fetch-timeout 100000
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - restore-cache
|
# - restore-cache
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ steps:
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
# endpoint: https://s3.fr-par.scw.cloud
|
||||||
# region: fr-par
|
# region: fr-par
|
||||||
# path_style: true
|
# path_style: true
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||||
# mount:
|
# mount:
|
||||||
# - '.cache'
|
# - '.cache'
|
||||||
# depends_on:
|
# depends_on:
|
||||||
|
@ -73,10 +73,10 @@ steps:
|
||||||
image: node:16
|
image: node:16
|
||||||
pull: true
|
pull: true
|
||||||
environment:
|
environment:
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||||
commands:
|
commands:
|
||||||
- yarn run lint
|
- pnpm run lint
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -84,9 +84,9 @@ steps:
|
||||||
image: node:16
|
image: node:16
|
||||||
pull: true
|
pull: true
|
||||||
environment:
|
environment:
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- pnpm run build
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ steps:
|
||||||
image: node:16
|
image: node:16
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- yarn test:unit
|
- pnpm run test:unit
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ steps:
|
||||||
image: node:16
|
image: node:16
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- yarn typecheck
|
- pnpm run typecheck
|
||||||
depends_on:
|
depends_on:
|
||||||
- dependencies
|
- dependencies
|
||||||
|
|
||||||
|
@ -113,15 +113,15 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
CYPRESS_API_URL: http://api:3456/api/v1
|
CYPRESS_API_URL: http://api:3456/api/v1
|
||||||
CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB
|
CYPRESS_TEST_SECRET: averyLongSecretToSe33dtheDB
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
CYPRESS_CACHE_FOLDER: .cache/cypress/
|
||||||
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
|
CYPRESS_DEFAULT_COMMAND_TIMEOUT: 60000
|
||||||
CYPRESS_RECORD_KEY:
|
CYPRESS_RECORD_KEY:
|
||||||
from_secret: cypress_project_key
|
from_secret: cypress_project_key
|
||||||
commands:
|
commands:
|
||||||
- sed -i 's/localhost/api/g' dist/index.html
|
- sed -i 's/localhost/api/g' dist/index.html
|
||||||
- yarn serve:dist & npx wait-on http://localhost:4173
|
- pnpm run serve:dist & npx wait-on http://localhost:4173
|
||||||
- yarn test:frontend --browser chrome --record
|
- pnpm run test:frontend --browser chrome --record
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-prod
|
- build-prod
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ steps:
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
# endpoint: https://s3.fr-par.scw.cloud
|
||||||
# region: fr-par
|
# region: fr-par
|
||||||
# path_style: true
|
# path_style: true
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||||
# mount:
|
# mount:
|
||||||
# - '.cache'
|
# - '.cache'
|
||||||
|
|
||||||
|
@ -190,12 +190,12 @@ steps:
|
||||||
pull: true
|
pull: true
|
||||||
group: build-static
|
group: build-static
|
||||||
environment:
|
environment:
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
commands:
|
commands:
|
||||||
- yarn --frozen-lockfile --network-timeout 100000
|
- pnpm install --fetch-timeout 100000
|
||||||
- yarn run lint
|
- pnpm run lint
|
||||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
- "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
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - restore-cache
|
# - restore-cache
|
||||||
|
@ -256,7 +256,7 @@ steps:
|
||||||
# endpoint: https://s3.fr-par.scw.cloud
|
# endpoint: https://s3.fr-par.scw.cloud
|
||||||
# region: fr-par
|
# region: fr-par
|
||||||
# path_style: true
|
# path_style: true
|
||||||
# cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
|
# cache_key: '{{ .Repo.Name }}_{{ checksum "pnpm-lock.yaml" }}_{{ arch }}_{{ os }}'
|
||||||
# mount:
|
# mount:
|
||||||
# - '.cache'
|
# - '.cache'
|
||||||
|
|
||||||
|
@ -265,12 +265,12 @@ steps:
|
||||||
pull: true
|
pull: true
|
||||||
group: build-static
|
group: build-static
|
||||||
environment:
|
environment:
|
||||||
YARN_CACHE_FOLDER: .cache/yarn/
|
PNPM_CACHE_FOLDER: .cache/pnpm/
|
||||||
commands:
|
commands:
|
||||||
- yarn --frozen-lockfile --network-timeout 100000
|
- pnpm install --fetch-timeout 100000
|
||||||
- yarn run lint
|
- pnpm run lint
|
||||||
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
- "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
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - restore-cache
|
# - restore-cache
|
||||||
|
|
|
@ -8,10 +8,14 @@ node_modules
|
||||||
.env.*.local
|
.env.*.local
|
||||||
|
|
||||||
# Log files
|
# Log files
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
stats.html
|
stats.html
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.idea
|
.idea
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"eslint.packageManager": "yarn",
|
"eslint.packageManager": "pnpm",
|
||||||
"editor.formatOnSave": false,
|
"editor.formatOnSave": false,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": true
|
"source.fixAll": true
|
||||||
|
|
|
@ -6,7 +6,7 @@ WORKDIR /build
|
||||||
ARG USE_RELEASE=false
|
ARG USE_RELEASE=false
|
||||||
ARG RELEASE_VERSION=main
|
ARG RELEASE_VERSION=main
|
||||||
|
|
||||||
ENV YARN_CACHE_FOLDER .cache/yarn/
|
ENV PNPM_CACHE_FOLDER .cache/pnpm/
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
@ -16,10 +16,13 @@ RUN \
|
||||||
unzip frontend-release.zip -d dist/ && \
|
unzip frontend-release.zip -d dist/ && \
|
||||||
exit 0; \
|
exit 0; \
|
||||||
fi && \
|
fi && \
|
||||||
|
# https://pnpm.io/installation#using-corepack
|
||||||
|
corepack enable \
|
||||||
|
corepack prepare pnpm@7.0.0-rc.3 --activate \
|
||||||
# Build the frontend
|
# Build the frontend
|
||||||
yarn install --frozen-lockfile --network-timeout 100000 && \
|
pnpm install --fetch-timeout 100000 && \
|
||||||
echo '{"VERSION": "'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'"}' > src/version.json && \
|
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
|
||||||
|
|
||||||
# Stage 2: copy
|
# Stage 2: copy
|
||||||
FROM nginx
|
FROM nginx
|
||||||
|
|
|
@ -22,23 +22,23 @@ There is a [docker image available](https://hub.docker.com/r/vikunja/api) with s
|
||||||
## Project setup
|
## Project setup
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
### Compiles and hot-reloads for development
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn run serve
|
pnpm run serve
|
||||||
```
|
```
|
||||||
|
|
||||||
### Compiles and minifies for production
|
### Compiles and minifies for production
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn run build
|
pnpm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Lints and fixes files
|
### Lints and fixes files
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn run lint
|
pnpm run lint
|
||||||
```
|
```
|
||||||
|
|
|
@ -36,7 +36,7 @@ to get a shell inside the cypress container.
|
||||||
In that shell you can then execute the tests with
|
In that shell you can then execute the tests with
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn test:frontend
|
pnpm run test:frontend
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using The Cypress Dashboard
|
### Using The Cypress Dashboard
|
||||||
|
@ -44,5 +44,5 @@ yarn test:frontend
|
||||||
To open the Cypress Dashboard and run tests from there, run
|
To open the Cypress Dashboard and run tests from there, run
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn cypress:open
|
pnpm run cypress:open
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[build]
|
[build]
|
||||||
command = "yarn build"
|
command = "pnpm run build"
|
||||||
publish = "dist-preview"
|
publish = "dist-preview"
|
||||||
|
|
||||||
[[redirects]]
|
[[redirects]]
|
||||||
|
|
|
@ -147,5 +147,5 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"packageManager": "yarn@1.22.18"
|
"packageManager": "pnpm@7.0.0-rc.3"
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue