Skip to content

Merge pull request #5 from skonik/pre-commit-ci-update-config #32

Merge pull request #5 from skonik/pre-commit-ci-update-config

Merge pull request #5 from skonik/pre-commit-ci-update-config #32

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