Fix: GA4 のセッション管理を公式実装に近づける・イベント名を変更 #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |