add nox to github ci #10
Workflow file for this run
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: tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 | |
poetry install | |
- name: Format checking with Black | |
run: poetry run black --check . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 | |
poetry install | |
- name: Lint with Ruff | |
run: poetry run ruff --output-format=github . | |
type-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 | |
poetry install | |
- name: Type checking with Mypy | |
run: poetry run mypy . | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 | |
poetry install | |
- name: Test with pytest | |
run: poetry run coverage run -m pytest -vv tests && poetry run coverage report | |
# nox: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-version: | |
# - "3.9" | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# - name: Install dependencies | |
# run: | | |
# curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1 | |
# poetry install | |
# - name: Test with nox | |
# run: poetry run nox --reuse-existing-virtualenvs --no-install |