Skip to content

[pre-commit.ci] pre-commit autoupdate #37

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #37

Workflow file for this run

name: lint and test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.0
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: /home/runner/.cache/pypoetry/virtualenvs
installer-parallel: true
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: /home/runner/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: poetry install
- name: Run linter
run: |
poetry run black --check .
poetry run isort --check-only .
- name: Run tests
run: poetry run pytest --cov=git_limiter --cov-report xml tests
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
verbose: true