|
| 1 | +on: |
| 2 | + issue_comment: |
| 3 | + types: [created] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test_release: |
| 7 | + if: contains(github.event.comment.body, '/test_release') |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - id: get_tag |
| 11 | + run: echo tag="${BODY#/test_release }" >> $GITHUB_OUTPUT |
| 12 | + env: |
| 13 | + BODY: ${{ github.event.comment.body }} |
| 14 | + - uses: actions/checkout@v3 |
| 15 | + - id: download-voicevox_core |
| 16 | + uses: sevenc-nanashi/setup-voicevox@v0.1.0 |
| 17 | + with: |
| 18 | + download-item: "core" |
| 19 | + path: voicevox_core_resources |
| 20 | + version: ${{ steps.get_tag.outputs.tag }} |
| 21 | + - run: cp ${{ steps.download-voicevox_core.outputs.entrypoint }} tests/VoicevoxCoreSharp.Core.Tests/resources/libvoicevox_core.so |
| 22 | + # TOOD: Linux, bash前提のやつなのでいい感じにする |
| 23 | + - run: mkdir -p tests/VoicevoxCoreSharp.Core.Tests/resources/model; cp -r ${VOICEVOX_CORE_RESOURCES%/libvoicevox_core.so}/model/0.vvm tests/VoicevoxCoreSharp.Core.Tests/resources/model/sample.vvm |
| 24 | + env: |
| 25 | + VOICEVOX_CORE_RESOURCES: ${{ steps.download-voicevox_core.outputs.entrypoint }} |
| 26 | + - uses: actions/cache/restore@v3 |
| 27 | + id: restore-open-jtalk-dictionary |
| 28 | + with: |
| 29 | + path: open_jtalk_dic_utf_8-1.11.tar.gz |
| 30 | + key: open_jtalk_dic_utf_8-1.11 |
| 31 | + - if: ${{ steps.restore-open-jtalk-dictionary.outputs.cache-hit != 'true' }} |
| 32 | + run: curl -sSLfo open_jtalk_dic_utf_8-1.11.tar.gz https://jaist.dl.sourceforge.net/project/open-jtalk/Dictionary/open_jtalk_dic-1.11/open_jtalk_dic_utf_8-1.11.tar.gz |
| 33 | + - if: ${{ steps.restore-open-jtalk-dictionary.outputs.cache-hit != 'true' }} |
| 34 | + uses: actions/cache/save@v3 |
| 35 | + with: |
| 36 | + path: open_jtalk_dic_utf_8-1.11.tar.gz |
| 37 | + key: open_jtalk_dic_utf_8-1.11 |
| 38 | + - run: | |
| 39 | + cp open_jtalk_dic_utf_8-1.11.tar.gz ./tests/VoicevoxCoreSharp.Core.Tests/resources |
| 40 | + tar zxf ./tests/VoicevoxCoreSharp.Core.Tests/resources/open_jtalk_dic_utf_8-1.11.tar.gz -C tests/VoicevoxCoreSharp.Core.Tests/resources/ |
| 41 | + - run: dotnet test |
0 commit comments