Fix docs and tests #119
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: Code Quality and Tests | |
on: | |
push: | |
branches: [main, development] | |
pull_request: | |
branches: [main, development] | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ['3.8', '3.9'] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: Check format with black | |
run: poetry run black --check roughness/ tests/ | |
continue-on-error: true | |
- name: Check style with pylint | |
run: poetry run pylint roughness/ tests/ | |
continue-on-error: true | |
- name: Unit & Coverage test with pytest | |
run: poetry run pytest |