chore: test min version
This commit is contained in:
parent
b9f39311e6
commit
a16873ab76
|
@ -0,0 +1 @@
|
||||||
|
20.10.0
|
|
@ -22,6 +22,11 @@ jobs:
|
||||||
unit:
|
unit:
|
||||||
name: Unit tests (backend)
|
name: Unit tests (backend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -60,7 +65,7 @@ jobs:
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
@ -80,6 +85,11 @@ jobs:
|
||||||
e2e:
|
e2e:
|
||||||
name: E2E tests (backend)
|
name: E2E tests (backend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -103,7 +113,7 @@ jobs:
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
|
|
@ -19,6 +19,11 @@ jobs:
|
||||||
test:
|
test:
|
||||||
name: Federation test
|
name: Federation test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -43,7 +48,7 @@ jobs:
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Build Misskey
|
- name: Build Misskey
|
||||||
run: |
|
run: |
|
||||||
|
@ -51,6 +56,7 @@ jobs:
|
||||||
pnpm build
|
pnpm build
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: |
|
run: |
|
||||||
|
echo "NODE_VERSION=$(cat ${{ matrix.node-version-file }})" >> $GITHUB_ENV
|
||||||
cd packages/backend/test-federation
|
cd packages/backend/test-federation
|
||||||
bash ./setup.sh
|
bash ./setup.sh
|
||||||
sudo chmod 644 ./certificates/*.test.key
|
sudo chmod 644 ./certificates/*.test.key
|
||||||
|
|
|
@ -10,15 +10,15 @@ cd packages/backend/test-federation
|
||||||
First, you need to start servers by executing following commands:
|
First, you need to start servers by executing following commands:
|
||||||
```sh
|
```sh
|
||||||
bash ./setup.sh
|
bash ./setup.sh
|
||||||
docker compose up --scale tester=0
|
NODE_VERSION=22 docker compose up --scale tester=0
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can run all tests by a following command:
|
Then you can run all tests by a following command:
|
||||||
```sh
|
```sh
|
||||||
docker compose run --no-deps --rm tester
|
NODE_VERSION=22 docker compose run --no-deps --rm tester
|
||||||
```
|
```
|
||||||
|
|
||||||
For testing a specific file, run a following command:
|
For testing a specific file, run a following command:
|
||||||
```sh
|
```sh
|
||||||
docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts
|
NODE_VERSION=22 docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts
|
||||||
```
|
```
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
misskey:
|
misskey:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
env_file:
|
env_file:
|
||||||
- ./.config/docker.env
|
- ./.config/docker.env
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -16,7 +16,7 @@ services:
|
||||||
"
|
"
|
||||||
|
|
||||||
tester:
|
tester:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
depends_on:
|
depends_on:
|
||||||
a.test:
|
a.test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
@ -85,7 +85,7 @@ services:
|
||||||
command: pnpm -F backend test:fed
|
command: pnpm -F backend test:fed
|
||||||
|
|
||||||
daemon:
|
daemon:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
depends_on:
|
depends_on:
|
||||||
redis.test:
|
redis.test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
Loading…
Reference in New Issue