Skip to content

Commit 0a382dd

Browse files
authored
Dont run CI on draft pull requests (#264)
1 parent 09afeec commit 0a382dd

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/api-pull-request.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ on:
55
paths:
66
- 'api/**'
77
- '.github/**'
8+
types: [opened, synchronize, reopened, ready_for_review]
89

910
defaults:
1011
run:
1112
working-directory: api
1213

1314
jobs:
1415
test:
16+
if: github.event.pull_request.draft == false
1517
runs-on: ubuntu-latest
1618
name: API Unit Tests
17-
19+
1820
services:
1921
postgres:
2022
image: postgres:11.12-alpine
@@ -24,31 +26,31 @@ jobs:
2426
POSTGRES_DB: postgres
2527
ports: ['5432:5432']
2628
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
27-
29+
2830
strategy:
2931
max-parallel: 4
3032
matrix:
3133
python-version: [3.6, 3.7, 3.8, 3.9]
32-
34+
3335
steps:
3436
- name: Cloning repo
3537
uses: actions/checkout@v2
3638
with:
3739
fetch-depth: 0
38-
40+
3941
- name: Set up Python ${{ matrix.python-version }}
4042
uses: actions/setup-python@v2
4143
with:
4244
python-version: ${{ matrix.python-version }}
43-
45+
4446
- name: Install Dependencies
4547
run: |
4648
python -m pip install --upgrade pip
4749
pip install -r requirements-dev.txt
48-
50+
4951
- name: Check Formatting
5052
run: black --check .
51-
53+
5254
- name: Run Tests
5355
env:
5456
DATABASE_URL:

.github/workflows/platform-pull-request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Platform Pull Requests
22

33
on:
4-
- pull_request
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56

67
jobs:
78
run-e2e-tests:
9+
if: github.event.pull_request.draft == false
810
runs-on: ubuntu-latest
911
name: Full E2E tests
1012

0 commit comments

Comments
 (0)