Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adiciona Github Actions Workflow para Pull Requests #31

Merged
merged 13 commits into from
Oct 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: pull-request

on:
pull_request:
paths-ignore:
- 'docs-src/**'
- 'docs/**'


jobs:
tests:
name: unittests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [3.6, 3.7, 3.8, 3.9, 3.x]
steps:
- name: checkout
uses: actions/checkout@v2

- name: Install python ${{matrix.python}}
uses: actions/setup-python@v2
with:
python-version: ${{matrix.python}}

- name: Install pip/pipenv
run: pip install -U pip==20.2.3 pipenv==2020.8.13

- name: pipenv install --dev
run: pipenv install --system --deploy --ignore-pipfile --dev

- name: pipenv run test
run: pipenv run test

- name: Coverage upload
if: ${{matrix.python == '3.8'}}
uses: paambaati/codeclimate-action@v2.7.4
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}

- name: Coverage Skipped
if: ${{matrix.python != '3.8'}}
run: echo "Coverage uploaded only on python 3.8 run"

lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: install {libxml2,libxslt}-dev
run: sudo apt-get install libxml2-dev libxslt-dev

- name: checkout
uses: actions/checkout@v2

- name: Install python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install pip/pipenv
run: pip install -U pip==20.2.3 pipenv==2020.8.13

- name: pipenv install --dev
run: pipenv install --system --deploy --ignore-pipfile --dev

- name: pipenv run lint
run: pipenv run lint

- name: pipenv run fmt-check
run: pipenv run fmt-check

- name: pipenv run isort-check
run: pipenv run isort-check
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ mypy = "==0.782"
black = "==18.9b0"
isort = {extras = ["pipfile"],version = "==4.3.15"}
python-boilerplate = {editable = true,path = "."}
lxml = "==4.4.1"
lxml = "==4.6.1"

[requires]
python_version = "3.8"
python_version = "3"

[scripts]
test = "py.test -v --cov=myproj --cov-report=term-missing --cov-report=xml -v"
Expand Down
Loading