Various fixes for PyPY, README, and CONTRIBUTING #2
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: lint-and-test | |
on: | |
pull_request: | |
paths: | |
- mfglib | |
- tests | |
- docs/source/*.py | |
- pyproject.toml | |
- .github/workflows/lint-and-test.yml | |
jobs: | |
lint-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
concurrency: | |
group: $${{ matrix.os }}-${{ matrix.python-version }}-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Poetry version | |
run: poetry --version | |
- name: Install package | |
run: poetry install | |
- name: Activate venv | |
run: source $VENV | |
- name: Lint (black) | |
run: poetry run black . --check | |
- name: Lint (isort) | |
run: poetry run isort . --check | |
- name: Lint (ruff) | |
run: poetry run ruff mfglib tests | |
- name: Lint (mypy) | |
run: poetry run mypy | |
- name: Test (pytest) | |
run: poetry run pytest |