Skip to content

Commit

Permalink
Merge PR #31 (feature/add-github-workflow-for-pull-requests) into master
Browse files Browse the repository at this point in the history
  • Loading branch information
daltonmatos committed Oct 31, 2020
2 parents d2d788b + 644b881 commit 8ff1057
Show file tree
Hide file tree
Showing 4 changed files with 613 additions and 5 deletions.
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

0 comments on commit 8ff1057

Please sign in to comment.