workflow #89
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
on: push | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.11-bookworm | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v2 | |
- name: install git | |
run: apt-get update && apt-get install -y git | |
- name: virtualenv for pre-commit | |
run: python -m venv ~/.pre-commit && ~/.pre-commit/bin/pip install --upgrade pip pre-commit | |
- name: run pre-commit | |
run: ~/.pre-commit/bin/pre-commit run --all | |
- name: allow access to the virtualenv | |
run: echo PATH="$(~/.poetry/bin/poetry run printenv VIRTUAL_ENV)/bin:${PATH}" >> $GITHUB_ENV | |
- name: black | |
run: black --check . | |
- name: flake8 | |
run: flake8 | |
- name: pytest | |
run: pytest --cov=ragdoll --cov-report term-missing tests/ | |
- name: build | |
run: ~/.poetry/bin/poetry build | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
container: | |
image: python:${{ matrix.python }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v2 | |
- name: make venv | |
run: python -m venv ~/.venv && ~/.venv/bin/pip install -r requirements.txt | |
- name: allow access to the virtualenv | |
run: echo PATH="$(realpath ~/.venv/bin):${PATH}" >> ${GITHUB_ENV} | |
- name: run tests | |
run: pytest --cov=ragdoll --cov-report term-missing tests/ |