iceshrimp-legacy/.github/workflows/test.yml

118 lines
2.9 KiB
YAML
Raw Normal View History

2021-10-27 18:16:13 +02:00
name: Test
on:
push:
branches:
- master
- develop
pull_request:
Add GitHub Actions (#5522) * add .github/workflows/nodejs.yml * fix * GitHub Actions: Node.js 8.xはサポートしない * add .github/workflows/docker.yml * Dockerビルドをキャッシュするように * Run test in github actions * 同リポジトリ内からのプルリクだと無駄に二回走るのを抑制 * 6925c00のdocker.ymlへの適応忘れ * fix .circleci/misskey/test.yml * test実行時にDBとかredisとか動かすように * fix * fix tests (#5544) * fix test * fix compile errors * PATH引き継ぎでchild_process.spawn時のENOENTを修正 * サーバー起動処理を共通化 * fix coding style * fd=4をipcに使うように * fix port * fix * fix ws port * #4033 にテストケースを追従 * fix? * fix?? * fix * fix * fix * maybe fix * fix * node 10.xサポートしてなかった * 11.10じゃないとだめだった * fix * remove chart test * fix * chart test復活 * fix * 一回一回コネクションを閉じる * Revert "一回一回コネクションを閉じる" This reverts commit 56e35cf4f83070744c8dd852f1a7075011d88828. * 一回一回sync→dropしてるのをやめてみる * fix * fix * … * キャッシュを切ってみる * add ts to require target * omg fix * Revert "キャッシュを切ってみる" This reverts commit 88161c59d2ea769ddf87143ba4fd4660a06afdf2. * done呼び忘れ * 実際の文字数リミットと違ってたので対応 * テストケースがバグってたので修正 * Revert "一回一回sync→dropしてるのをやめてみる" This reverts commit a9e543ba2eef790ac7a14ae8799b898765748e35. * fix * fix * fix * fix? * fix * chartのconnectionを分離する * fix * fix * fix tsconfig? * Revert "fix tsconfig?" This reverts commit ba9269eaf65507ff97ec1dd2e27260fb2cf0510b. * fix * TS_NODE_FILES を scripts の方で指定 * Windowsェ * Circle CIの実行条件をmasterへのpushのみに Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2020-01-09 06:35:04 +01:00
jobs:
2021-10-27 18:16:13 +02:00
mocha:
Add GitHub Actions (#5522) * add .github/workflows/nodejs.yml * fix * GitHub Actions: Node.js 8.xはサポートしない * add .github/workflows/docker.yml * Dockerビルドをキャッシュするように * Run test in github actions * 同リポジトリ内からのプルリクだと無駄に二回走るのを抑制 * 6925c00のdocker.ymlへの適応忘れ * fix .circleci/misskey/test.yml * test実行時にDBとかredisとか動かすように * fix * fix tests (#5544) * fix test * fix compile errors * PATH引き継ぎでchild_process.spawn時のENOENTを修正 * サーバー起動処理を共通化 * fix coding style * fd=4をipcに使うように * fix port * fix * fix ws port * #4033 にテストケースを追従 * fix? * fix?? * fix * fix * fix * maybe fix * fix * node 10.xサポートしてなかった * 11.10じゃないとだめだった * fix * remove chart test * fix * chart test復活 * fix * 一回一回コネクションを閉じる * Revert "一回一回コネクションを閉じる" This reverts commit 56e35cf4f83070744c8dd852f1a7075011d88828. * 一回一回sync→dropしてるのをやめてみる * fix * fix * … * キャッシュを切ってみる * add ts to require target * omg fix * Revert "キャッシュを切ってみる" This reverts commit 88161c59d2ea769ddf87143ba4fd4660a06afdf2. * done呼び忘れ * 実際の文字数リミットと違ってたので対応 * テストケースがバグってたので修正 * Revert "一回一回sync→dropしてるのをやめてみる" This reverts commit a9e543ba2eef790ac7a14ae8799b898765748e35. * fix * fix * fix * fix? * fix * chartのconnectionを分離する * fix * fix * fix tsconfig? * Revert "fix tsconfig?" This reverts commit ba9269eaf65507ff97ec1dd2e27260fb2cf0510b. * fix * TS_NODE_FILES を scripts の方で指定 * Windowsェ * Circle CIの実行条件をmasterへのpushのみに Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2020-01-09 06:35:04 +01:00
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
services:
postgres:
image: postgres:13
ports:
- 54312:5432
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
2022-06-01 04:41:15 +02:00
YARN_CHECKSUM_BEHAVIOR: update
redis:
image: redis:6
ports:
- 56312:6379
Add GitHub Actions (#5522) * add .github/workflows/nodejs.yml * fix * GitHub Actions: Node.js 8.xはサポートしない * add .github/workflows/docker.yml * Dockerビルドをキャッシュするように * Run test in github actions * 同リポジトリ内からのプルリクだと無駄に二回走るのを抑制 * 6925c00のdocker.ymlへの適応忘れ * fix .circleci/misskey/test.yml * test実行時にDBとかredisとか動かすように * fix * fix tests (#5544) * fix test * fix compile errors * PATH引き継ぎでchild_process.spawn時のENOENTを修正 * サーバー起動処理を共通化 * fix coding style * fd=4をipcに使うように * fix port * fix * fix ws port * #4033 にテストケースを追従 * fix? * fix?? * fix * fix * fix * maybe fix * fix * node 10.xサポートしてなかった * 11.10じゃないとだめだった * fix * remove chart test * fix * chart test復活 * fix * 一回一回コネクションを閉じる * Revert "一回一回コネクションを閉じる" This reverts commit 56e35cf4f83070744c8dd852f1a7075011d88828. * 一回一回sync→dropしてるのをやめてみる * fix * fix * … * キャッシュを切ってみる * add ts to require target * omg fix * Revert "キャッシュを切ってみる" This reverts commit 88161c59d2ea769ddf87143ba4fd4660a06afdf2. * done呼び忘れ * 実際の文字数リミットと違ってたので対応 * テストケースがバグってたので修正 * Revert "一回一回sync→dropしてるのをやめてみる" This reverts commit a9e543ba2eef790ac7a14ae8799b898765748e35. * fix * fix * fix * fix? * fix * chartのconnectionを分離する * fix * fix * fix tsconfig? * Revert "fix tsconfig?" This reverts commit ba9269eaf65507ff97ec1dd2e27260fb2cf0510b. * fix * TS_NODE_FILES を scripts の方で指定 * Windowsェ * Circle CIの実行条件をmasterへのpushのみに Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2020-01-09 06:35:04 +01:00
steps:
2020-05-08 10:46:58 +02:00
- uses: actions/checkout@v2
with:
submodules: true
Add GitHub Actions (#5522) * add .github/workflows/nodejs.yml * fix * GitHub Actions: Node.js 8.xはサポートしない * add .github/workflows/docker.yml * Dockerビルドをキャッシュするように * Run test in github actions * 同リポジトリ内からのプルリクだと無駄に二回走るのを抑制 * 6925c00のdocker.ymlへの適応忘れ * fix .circleci/misskey/test.yml * test実行時にDBとかredisとか動かすように * fix * fix tests (#5544) * fix test * fix compile errors * PATH引き継ぎでchild_process.spawn時のENOENTを修正 * サーバー起動処理を共通化 * fix coding style * fd=4をipcに使うように * fix port * fix * fix ws port * #4033 にテストケースを追従 * fix? * fix?? * fix * fix * fix * maybe fix * fix * node 10.xサポートしてなかった * 11.10じゃないとだめだった * fix * remove chart test * fix * chart test復活 * fix * 一回一回コネクションを閉じる * Revert "一回一回コネクションを閉じる" This reverts commit 56e35cf4f83070744c8dd852f1a7075011d88828. * 一回一回sync→dropしてるのをやめてみる * fix * fix * … * キャッシュを切ってみる * add ts to require target * omg fix * Revert "キャッシュを切ってみる" This reverts commit 88161c59d2ea769ddf87143ba4fd4660a06afdf2. * done呼び忘れ * 実際の文字数リミットと違ってたので対応 * テストケースがバグってたので修正 * Revert "一回一回sync→dropしてるのをやめてみる" This reverts commit a9e543ba2eef790ac7a14ae8799b898765748e35. * fix * fix * fix * fix? * fix * chartのconnectionを分離する * fix * fix * fix tsconfig? * Revert "fix tsconfig?" This reverts commit ba9269eaf65507ff97ec1dd2e27260fb2cf0510b. * fix * TS_NODE_FILES を scripts の方で指定 * Windowsェ * Circle CIの実行条件をmasterへのpushのみに Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2020-01-09 06:35:04 +01:00
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.2.0
Add GitHub Actions (#5522) * add .github/workflows/nodejs.yml * fix * GitHub Actions: Node.js 8.xはサポートしない * add .github/workflows/docker.yml * Dockerビルドをキャッシュするように * Run test in github actions * 同リポジトリ内からのプルリクだと無駄に二回走るのを抑制 * 6925c00のdocker.ymlへの適応忘れ * fix .circleci/misskey/test.yml * test実行時にDBとかredisとか動かすように * fix * fix tests (#5544) * fix test * fix compile errors * PATH引き継ぎでchild_process.spawn時のENOENTを修正 * サーバー起動処理を共通化 * fix coding style * fd=4をipcに使うように * fix port * fix * fix ws port * #4033 にテストケースを追従 * fix? * fix?? * fix * fix * fix * maybe fix * fix * node 10.xサポートしてなかった * 11.10じゃないとだめだった * fix * remove chart test * fix * chart test復活 * fix * 一回一回コネクションを閉じる * Revert "一回一回コネクションを閉じる" This reverts commit 56e35cf4f83070744c8dd852f1a7075011d88828. * 一回一回sync→dropしてるのをやめてみる * fix * fix * … * キャッシュを切ってみる * add ts to require target * omg fix * Revert "キャッシュを切ってみる" This reverts commit 88161c59d2ea769ddf87143ba4fd4660a06afdf2. * done呼び忘れ * 実際の文字数リミットと違ってたので対応 * テストケースがバグってたので修正 * Revert "一回一回sync→dropしてるのをやめてみる" This reverts commit a9e543ba2eef790ac7a14ae8799b898765748e35. * fix * fix * fix * fix? * fix * chartのconnectionを分離する * fix * fix * fix tsconfig? * Revert "fix tsconfig?" This reverts commit ba9269eaf65507ff97ec1dd2e27260fb2cf0510b. * fix * TS_NODE_FILES を scripts の方で指定 * Windowsェ * Circle CIの実行条件をmasterへのpushのみに Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2020-01-09 06:35:04 +01:00
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
2022-05-30 05:26:38 +02:00
- run: corepack enable
- run: yarn install --immutable
- name: Check yarn.lock
run: git diff --exit-code yarn.lock
- name: Copy Configure
2021-11-12 04:43:55 +01:00
run: cp .github/misskey/test.yml .config
- name: Build
run: yarn build
- name: Test
2021-10-27 18:16:13 +02:00
run: yarn mocha
2021-10-27 18:16:13 +02:00
e2e:
runs-on: ubuntu-latest
2021-10-27 18:16:13 +02:00
strategy:
fail-fast: false
2021-10-27 18:16:13 +02:00
matrix:
node-version: [18.x]
browser: [chrome]
2021-10-27 18:16:13 +02:00
services:
postgres:
image: postgres:13
2021-10-27 18:16:13 +02:00
ports:
- 54312:5432
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:6
2021-10-27 18:16:13 +02:00
ports:
- 56312:6379
steps:
- uses: actions/checkout@v2
with:
submodules: true
# https://github.com/cypress-io/cypress-docker-images/issues/150
#- name: Install mplayer for FireFox
# run: sudo apt install mplayer -y
# if: ${{ matrix.browser == 'firefox' }}
#- uses: browser-actions/setup-firefox@latest
# if: ${{ matrix.browser == 'firefox' }}
2021-10-27 18:16:13 +02:00
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.2.0
with:
2021-10-27 18:16:13 +02:00
node-version: ${{ matrix.node-version }}
cache: 'yarn'
2022-05-30 05:26:38 +02:00
- run: corepack enable
- run: yarn install --immutable
2022-05-31 17:38:27 +02:00
env:
YARN_CHECKSUM_BEHAVIOR: update
2021-10-27 18:16:13 +02:00
- name: Copy Configure
2021-11-12 04:43:55 +01:00
run: cp .github/misskey/test.yml .config
2021-10-27 18:16:13 +02:00
- name: Build
run: yarn build
# https://github.com/cypress-io/cypress/issues/4351#issuecomment-559489091
- name: ALSA Env
run: echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
- name: Cypress run
uses: cypress-io/github-action@v4
with:
install: false
2022-06-03 15:39:07 +02:00
start: yarn start:test
wait-on: 'http://localhost:61812'
headless: false
browser: ${{ matrix.browser }}
- uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ matrix.browser }}-cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
if: always()
with:
name: ${{ matrix.browser }}-cypress-videos
path: cypress/videos