Skip to content

Commit 728261d

Browse files
committed
improv: CI to run on pull requests
instruct GitHub Actions to run upon pull requests according to the docs
1 parent 727acc4 commit 728261d

File tree

2 files changed

+30
-21
lines changed

2 files changed

+30
-21
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
1-
name: Python package
1+
name: Powertools Python
22

33
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- master
8+
paths:
9+
- "python/**"
410
push:
11+
branches:
12+
- develop
13+
- master
514
paths:
6-
- 'python/**'
15+
- "python/**"
716

817
jobs:
918
build:
10-
1119
runs-on: ubuntu-latest
1220
strategy:
1321
max-parallel: 4
1422
matrix:
1523
python-version: [3.6, 3.7]
1624
steps:
17-
- uses: actions/checkout@v1
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v1
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
make dev
26-
working-directory: ./python/
27-
- name: Formatting and Linting
28-
run: |
29-
make lint
30-
working-directory: ./python/
31-
- name: Test with pytest
32-
run: |
33-
make test
34-
working-directory: ./python/
25+
- uses: actions/checkout@v1
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v1
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
make dev
34+
working-directory: ./python/
35+
- name: Formatting and Linting
36+
run: |
37+
make lint
38+
working-directory: ./python/
39+
- name: Test with pytest
40+
run: |
41+
make test
42+
working-directory: ./python/

python/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ target:
33
@$(MAKE) pr
44

55
dev:
6+
pip install --upgrade pipenv
67
pipenv install
78
pipenv install -d
89

0 commit comments

Comments
 (0)