You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spiel/.github/workflows/quality-check.yml

56 lines
1.5 KiB
YAML

name: quality-check
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9]
defaults:
run:
shell: bash
runs-on: ${{ matrix.platform }}
env:
PLATFORM: ${{ matrix.platform }}
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1.1.2
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached virtual environment
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install package
run: poetry install --no-interaction
- name: Run tests
run: poetry run pytest --cov --cov-report=xml
- name: Check types
run: poetry run mypy
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
env_vars: PLATFORM,PYTHON_VERSION
fail_ci_if_error: true
verbose: true