NameMatchLevel: add TYPO level #304
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: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: test-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
PYTHONUNBUFFERED: "1" | |
FORCE_COLOR: "1" | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
# Workaround for | |
# https://github.com/actions/setup-python/issues/696#issuecomment-2072959905 | |
# ideally we can remove this later. | |
exclude: | |
- os: macos-14 | |
python-version: '3.9' | |
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 PDM | |
run: pip install --upgrade pdm | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: "1.14" # optional semver specification, otherwise latest | |
- name: Install libpostal | |
run: | | |
if [ "$RUNNER_OS" != "Windows" ]; then | |
just install-libpostal | |
else | |
echo "Postal installation not supported on $RUNNER_OS" | |
fi | |
shell: bash | |
- name: Install dev environment | |
run: just install | |
- name: Run tests | |
run: pdm run just test | |
lint-and-docs: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install PDM | |
run: pip install --upgrade pdm | |
- uses: extractions/setup-just@v2 | |
with: | |
just-version: "1.14" # optional semver specification, otherwise latest | |
- name: Install libpostal | |
run: just install-libpostal | |
- name: Install dev environment | |
run: just install | |
- name: Run linters | |
run: pdm run just lint | |
- name: Build docs | |
run: pdm run just docs-build | |
- name: Publish docs | |
if: github.repository == 'NickCrews/mismo' && github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: pdm run just docs-publish | |