docs: Public license #56
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: Hanja | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: pip cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip | |
- name: Install dependencies | |
env: | |
UV_SYSTEM_PYTHON: true | |
run: | | |
python -m pip install --upgrade pip uv | |
uv pip install black mypy | |
uv pip install -e . | |
if [ -f tests/requirements.txt ]; then uv pip install -r tests/requirements.txt; fi | |
- name: Lint with black and mypy | |
run: | | |
black --check . | |
mypy --install-types --non-interactive --ignore-missing-imports hanja | |
- name: Test with pytest | |
run: | | |
pytest -v tests --cov hanja --cov-report term-missing |