-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (55 loc) · 1.84 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test
on:
push:
pull_request:
branches:
- "**"
workflow_dispatch:
env:
AIVISSPEECH_ENGINE_REPO: "Aivis-Project/AivisSpeech-Engine"
AIVISSPEECH_ENGINE_VERSION: "1.1.0-dev"
defaults:
run:
shell: bash
jobs:
config: # 全 jobs で利用する定数の定義. `env` が利用できないコンテキストでも利用できる.
runs-on: ubuntu-latest
outputs:
shouldUpdateSnapshots: ${{ steps.check-whether-to-update-snapshots.outputs.shouldUpdateSnapshots }}
steps:
- name: Check if commit message includes [update snapshots]
id: check-whether-to-update-snapshots
uses: actions/github-script@v7
with:
script: |
const commits = ${{ toJson(github.event.commits) }};
if (!commits) {
// pull_request などでコミットがない場合はスキップ
core.setOutput("shouldUpdateSnapshots", false);
process.exit(0);
}
const shouldUpdateSnapshots = commits.some((commit) =>
commit.message.toLowerCase().includes("[update snapshots]")
);
core.setOutput("shouldUpdateSnapshots", shouldUpdateSnapshots);
console.log(`shouldUpdateSnapshots: ${shouldUpdateSnapshots}`);
# ビルドのテスト
build-test:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- run: npm run electron:build
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Disallowed licenses check
run: npm run license:generate
- run: npm run typecheck
- run: npm run lint
# - run: npm run markdownlint
- run: npm run typos