Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron committed Mar 15, 2024
1 parent 2c08a9e commit 75914b2
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
on: push

jobs:
ci:
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

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.6", "3.7", "3.8", "3.9"]
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: virtualenv for poetry
run: python -m venv ~/.poetry && ~/.poetry/bin/pip install --upgrade pip
- name: install poetry in virtualenv
run: ~/.poetry/bin/pip install poetry
- name: install python dependencies
run: ~/.poetry/bin/poetry install
- 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
- name: make venv
run: python -m venv ~/.venv && ~/.venv/bin/pip install -r requirements.txt
- name: run tests
run: ~/.venv/bin/pytest --cov=ragdoll --cov-report term-missing tests/

0 comments on commit 75914b2

Please sign in to comment.