Skip to content

Commit 68e08d6

Browse files
committed
Run only ferrum master when label is master and PR is draft
1 parent 35db994 commit 68e08d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ on:
44
branches:
55
- master
66
pull_request:
7+
types: [opened, synchronize, reopened, labeled]
78

89
jobs:
910
tests:
1011
name: Tests
11-
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
gemfile: [capybara-3.x, websocket-driver-6.x, ferrum-master]
1616
ruby: [2.6, 2.7, 3.0]
17-
1817
runs-on: ubuntu-latest
1918
env:
2019
FERRUM_PROCESS_TIMEOUT: 20
@@ -39,6 +38,11 @@ jobs:
3938

4039
- name: Run tests
4140
run: bundle exec rake
41+
if: |
42+
github.event.pull_request.draft == false ||
43+
(github.event.pull_request.draft == true &&
44+
contains(github.event.pull_request.labels.*.name, 'master') &&
45+
matrix.gemfile == 'ferrum-master')
4246
4347
- name: Archive artifacts
4448
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)