1
0
forked from mirror/misskey
mi.moris.day/packages/backend/test-federation/compose.yml
かっこかり 9c70a4e631
fix(build): corepackのバグの回避 (#15387)
* fix: disallow corepack from fetching latest manager version instead use specified version in package.json

* Update Changelog

* fix?

* apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows

* Revert "apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows"

This reverts commit 67f0dc31adaa04f891f74f5c44a3d4d13a302a03.

* apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows (re)

* fix

* fix?

* revert: removing corepack enable

* test: set COREPACK_DEFAULT_TO_LATEST for federation tests

---------

Co-authored-by: Marie <github@yuugi.dev>
Co-authored-by: anatawa12 <anatawa12@icloud.com>
2025-02-03 13:45:59 +00:00

137 lines
3.8 KiB
YAML

include:
- ./compose.a.yml
- ./compose.b.yml
services:
setup:
extends:
file: ./compose.tpl.yml
service: misskey
command: >
bash -c "
corepack enable && corepack prepare
pnpm -F backend i
pnpm -F misskey-js i
pnpm -F misskey-reversi i
"
tester:
image: node:20
depends_on:
a.test:
condition: service_healthy
b.test:
condition: service_healthy
environment:
- NODE_ENV=development
- NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/rootCA.crt
- COREPACK_DEFAULT_TO_LATEST=0
volumes:
- type: bind
source: ../package.json
target: /misskey/packages/backend/package.json
read_only: true
- type: bind
source: ../test/resources
target: /misskey/packages/backend/test/resources
read_only: true
- type: bind
source: ./test
target: /misskey/packages/backend/test-federation/test
read_only: true
- type: bind
source: ../jest.config.cjs
target: /misskey/packages/backend/jest.config.cjs
read_only: true
- type: bind
source: ../jest.config.fed.cjs
target: /misskey/packages/backend/jest.config.fed.cjs
read_only: true
- type: bind
source: ../../misskey-js/built
target: /misskey/packages/misskey-js/built
read_only: true
- type: bind
source: ../../misskey-js/package.json
target: /misskey/packages/misskey-js/package.json
read_only: true
- type: bind
source: ../../../package.json
target: /misskey/package.json
read_only: true
- type: bind
source: ../../../pnpm-lock.yaml
target: /misskey/pnpm-lock.yaml
read_only: true
- type: bind
source: ../../../pnpm-workspace.yaml
target: /misskey/pnpm-workspace.yaml
read_only: true
- type: bind
source: ./certificates/rootCA.crt
target: /usr/local/share/ca-certificates/rootCA.crt
read_only: true
working_dir: /misskey
entrypoint: >
bash -c '
corepack enable && corepack prepare
pnpm -F misskey-js i --frozen-lockfile
pnpm -F backend i --frozen-lockfile
exec "$0" "$@"
'
command: pnpm -F backend test:fed
daemon:
image: node:20
depends_on:
redis.test:
condition: service_healthy
environment:
- COREPACK_DEFAULT_TO_LATEST=0
volumes:
- type: bind
source: ../package.json
target: /misskey/packages/backend/package.json
read_only: true
- type: bind
source: ./daemon.ts
target: /misskey/packages/backend/test-federation/daemon.ts
read_only: true
- type: bind
source: ./tsconfig.json
target: /misskey/packages/backend/test-federation/tsconfig.json
read_only: true
- type: bind
source: ../../../package.json
target: /misskey/package.json
read_only: true
- type: bind
source: ../../../pnpm-lock.yaml
target: /misskey/pnpm-lock.yaml
read_only: true
- type: bind
source: ../../../pnpm-workspace.yaml
target: /misskey/pnpm-workspace.yaml
read_only: true
working_dir: /misskey
command: >
bash -c "
corepack enable && corepack prepare
pnpm -F backend i --frozen-lockfile
pnpm exec tsc -p ./packages/backend/test-federation
node ./packages/backend/test-federation/built/daemon.js
"
redis.test:
image: redis:7-alpine
volumes:
- type: bind
source: ./volumes/redis
target: /data
bind:
create_host_path: true
healthcheck:
test: redis-cli ping
interval: 5s
retries: 20