-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# VOICEVOX .github Workflow README | ||
|
||
`shared.yml`は全 VOICEVOX リポジトリで共通するワークフローをまとめたものです。 | ||
`test.yml`をコピペして使うことを想定しています。 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: VOICEVOX Shared Workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
super_linter_env_vars: | ||
type: string | ||
description: "super linter用の環境変数定義。複数行のenv_name=env_value" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
super-linter: | ||
name: Super Linter | ||
uses: VOICEVOX/.github/.github/workflows/super-linter.yml@main | ||
with: | ||
env_vars: ${{ inputs.super_linter_env_vars }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# https://github.com/super-linter/super-linter/blob/main/TEMPLATES/linter.yml | ||
--- | ||
name: Super Linter | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
env_vars: | ||
type: string | ||
description: "env_name=env_value,..." | ||
|
||
jobs: | ||
super-linter: | ||
name: Super Linter | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 差分を取得するために必要 | ||
|
||
- name: Setup Environment Variables | ||
if: ${{ inputs.env_vars }} | ||
run: for line in "${{ inputs.env_vars }}"; do echo "$line" >> $GITHUB_ENV; done | ||
|
||
- name: Lint Code Base | ||
uses: super-linter/super-linter/slim@v5 | ||
env: | ||
VALIDATE_ALL_CODEBASE: true # すべてのファイルを検証する。 | ||
VALIDATE_JSCPD: false # コピペ検出。厳しすぎるので無効化。 | ||
VALIDATE_NATURAL_LANGUAGE: false # 自然言語検出。英語のみなので無効化。 | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test VOICEVOX Shared Workflow | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
voicevox-shared-workflow: | ||
uses: VOICEVOX/.github/.github/workflows/shared.yml@main | ||
|
||
# Super Linter に必要 | ||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
# Pythonの検証を無効化する例 | ||
# with: | ||
# super_linter_env_vars: | | ||
# VALIDATE_PYTHON=false | ||
# VALIDATE_PYTHON_BLACK=false | ||
# VALIDATE_PYTHON_FLAKE8=false | ||
# VALIDATE_PYTHON_ISORT=false | ||
# VALIDATE_PYTHON_MYPY=false | ||
# VALIDATE_PYTHON_PYLINT=false |