8
8
workflow_dispatch :
9
9
10
10
env :
11
- VOICEVOX_ENGINE_VERSION : 0.14.4
11
+ VOICEVOX_ENGINE_REPO : " VOICEVOX/voicevox_nemo_engine" # 軽いのでNemoを使う
12
+ VOICEVOX_ENGINE_VERSION : " 0.14.0"
12
13
13
14
defaults :
14
15
run :
15
16
shell : bash
16
-
17
+
17
18
jobs :
19
+ # ビルドのテスト
18
20
build-test :
19
21
runs-on : windows-latest
20
22
steps :
23
25
uses : ./.github/actions/setup-environment
24
26
- run : npm run electron:build_pnever
25
27
26
- test :
28
+ # unit テスト
29
+ unit-test :
27
30
runs-on : windows-latest
28
31
steps :
29
32
- uses : actions/checkout@v3
@@ -32,19 +35,52 @@ jobs:
32
35
33
36
- run : npm run test:unit
34
37
38
+ # electron の e2e テスト
39
+ e2e-test :
40
+ runs-on : ${{ matrix.os }}
41
+ strategy :
42
+ matrix :
43
+ os : [ubuntu-latest, macos-latest, windows-latest]
44
+ include :
45
+ - os : ubuntu-latest
46
+ voicevox_engine_asset_name : linux-cpu
47
+ - os : macos-latest
48
+ voicevox_engine_asset_name : macos-x64
49
+ - os : windows-latest
50
+ voicevox_engine_asset_name : windows-cpu
51
+ steps :
52
+ - uses : actions/checkout@v3
53
+ - name : Setup environment
54
+ uses : ./.github/actions/setup-environment
55
+
56
+ - name : Install xvfb and x11-xserver-utils
57
+ if : startsWith(matrix.os, 'ubuntu')
58
+ run : |
59
+ sudo apt-get update
60
+ sudo apt-get install -y xvfb x11-xserver-utils # for electron
61
+ sudo apt-get install -y libsndfile1 # for engine
62
+
35
63
- name : Download VOICEVOX ENGINE
36
64
id : download-engine
37
65
uses : ./.github/actions/download-engine
38
66
with :
67
+ repo : ${{ env.VOICEVOX_ENGINE_REPO }}
39
68
version : ${{ env.VOICEVOX_ENGINE_VERSION }}
40
69
dest : ${{ github.workspace }}/voicevox_engine
70
+ target : ${{ matrix.voicevox_engine_asset_name }}
41
71
42
72
- name : Run npm run test:e2e
43
73
run : |
74
+ chmod +x ${{ steps.download-engine.outputs.run_path }}
75
+
44
76
cp .env.test .env
45
77
sed -i -e 's|"../voicevox_engine/run.exe"|"${{ steps.download-engine.outputs.run_path }}"|' .env
78
+
46
79
if [ -n "${{ runner.debug }}" ]; then
47
- DEBUG=pw:browser* npm run test:e2e
80
+ export DEBUG="pw:browser*"
81
+ fi
82
+ if [[ ${{ matrix.os }} == ubuntu-* ]]; then
83
+ xvfb-run --auto-servernum npm run test:e2e
48
84
else
49
85
npm run test:e2e
50
86
fi
0 commit comments