.github/workflows/validate_commit.yml
name: Master
on: [push]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | POETRY_PREVIEW=1 python
source $HOME/.poetry/env
poetry install -v
- name: Lint
run: |
source $HOME/.poetry/env
poetry run pre-commit install-hooks
poetry run pre-commit run --all-files
tests:
name: Tests
runs-on: ubuntu-latest
needs: lint
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | POETRY_PREVIEW=1 python
source $HOME/.poetry/env
poetry install -v
- name: Tests
run: |
source $HOME/.poetry/env
poetry run pytest
coverege:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip codecov
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | POETRY_PREVIEW=1 python
source $HOME/.poetry/env
poetry install -v
- name: Coverage
run: |
source $HOME/.poetry/env
poetry run pytest --cov=git_taxbreak --cov-report=xml tests/
- name: Push coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
codecov