add bash #7
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: ["master"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install uv | |
python -m uv pip install --system .[dev] | |
- name: Run CLI | |
run: pinyin-to-ipa-cli | |
- name: Run linters | |
run: ruff check | |
- name: Type checking | |
run: mypy | |
- name: Run tests | |
run: pytest -n auto | |
- name: Run build | |
run: | | |
python -m build -o dist/ | |
python -m twine check dist/* | |
- name: Test install from sdist (.tar.gz) | |
shell: bash | |
run: | | |
python -m venv venv-sdist | |
source venv-sdist/bin/activate | |
python -m pip install dist/*.tar.gz | |
time python -c "import pinyin_to_ipa" | |
pytest -n auto | |
deactivate | |
- name: Test install from wheel (.whl) | |
shell: bash | |
run: | | |
python -m venv venv-wheel | |
source venv-wheel/bin/activate | |
python -m pip install dist/*.whl | |
time python -c "import pinyin_to_ipa" | |
deactivate |