Skip to content

Update: バージョン更新に備え、リリースノートを更新 #275

Update: バージョン更新に備え、リリースノートを更新

Update: バージョン更新に備え、リリースノートを更新 #275

Workflow file for this run

name: Test
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
env:
PYTHON_VERSION: "3.11.9"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-2022
- macos-13
- macos-14
- ubuntu-22.04
steps:
- name: <Setup> Check out the repository
uses: actions/checkout@v4
- name: <Setup> Prepare Python Runtime / Python Dependencies
uses: ./.github/actions/prepare_python
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: <Setup> Install Poetry
run: python -m pip install poetry
- name: <Setup> Cache Poetry
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-${{ runner.arch }}-poetry-${{ hashFiles('**/poetry.lock') }}
- name: <Setup> Cache Engine Data
uses: actions/cache@v4
with:
path: ~/.local/share/AivisSpeech-Engine
key: ${{ runner.os }}-${{ runner.arch }}-engine-data
- name: <Setup> Install Python dependencies
run: poetry install --with=dev
# - name: <Test> Validate poetry.lock
# run: |
# poetry lock
# git diff --exit-code
- name: <Test> Check linting
run: PYTHONUTF8=1 poetry run ruff check
- name: <Test> Check formatting
run: PYTHONUTF8=1 poetry run ruff format --check
- name: <Test> Check typing
run: poetry run mypy .
- name: <Test> Test codes and coverage
run: poetry run coverage run --omit=test/* -m pytest
- name: <Deploy> Submit coverage results to Coveralls
if: runner.os == 'Linux'
# Coveralls へのアップロードが失敗しても CI は継続させる
run: coveralls --service=github || echo "::warning::Coveralls failed, but continuing"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: <Test> Check licenses
run: poetry run task update-licenses
- name: <Test> Test names by checking typo
if: runner.os == 'Linux'
run: poetry run typos
lint-builders:
runs-on: ubuntu-22.04
steps:
- name: <Setup> Check out the repository
uses: actions/checkout@v4
- name: <Setup> Install ShellCheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: <Test> Check shell files
run: git ls-files | grep -E '\.(ba)?sh' | xargs shellcheck
- name: <Test> Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint