Skip to content

Commit

Permalink
improv: CI to run on pull requests
Browse files Browse the repository at this point in the history
instruct GitHub Actions to run upon pull requests according to the docs
  • Loading branch information
heitorlessa committed Jan 9, 2020
1 parent 727acc4 commit 728261d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
50 changes: 29 additions & 21 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
name: Python package
name: Powertools Python

on:
pull_request:
branches:
- develop
- master
paths:
- "python/**"
push:
branches:
- develop
- master
paths:
- 'python/**'
- "python/**"

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
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
make dev
working-directory: ./python/
- name: Formatting and Linting
run: |
make lint
working-directory: ./python/
- name: Test with pytest
run: |
make test
working-directory: ./python/
- 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
make dev
working-directory: ./python/
- name: Formatting and Linting
run: |
make lint
working-directory: ./python/
- name: Test with pytest
run: |
make test
working-directory: ./python/
1 change: 1 addition & 0 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ target:
@$(MAKE) pr

dev:
pip install --upgrade pipenv
pipenv install
pipenv install -d

Expand Down

0 comments on commit 728261d

Please sign in to comment.