Skip to content

add pre-commit with black,isort,flake8 #35

add pre-commit with black,isort,flake8

add pre-commit with black,isort,flake8 #35

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install poetry
run: |
pip install pipx && pipx install poetry~=1.6
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: install python dependencies
run: |
poetry install --no-interaction
- name: run linters via pre-commit
run: |
poetry run pre-commit run --all --show-diff-on-failure --color=always
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system package dependencies
run: |
sudo apt-get install -y python3-enchant aspell-en aspell-de
- name: install poetry
run: |
pip install pipx && pipx install poetry~=1.6
- name: install python dependencies
run: |
poetry install --no-interaction
- name: running tests
run: poetry run coverage run --source="pytest_translations" -m "pytest"
- name: uploading coverage
run: poetry run codecov