avoid running tests twice for pull requests

This implements the suggested method from [1]. It runs tests on all pushes to
our own repository and for pull requests coming from other people's forks.

[1] https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662/10
This commit is contained in:
Andreas Gohr 2020-11-20 23:52:08 +01:00
parent 2cf7c325f8
commit 7bbf38eeb4
3 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,10 @@
name: PHP Code Style
on: [push, pull_request]
on:
push:
pull_request:
branches:
- '**:**'
jobs:
phpcs:

View File

@ -1,6 +1,10 @@
name: Linux Unit Tests
on: [push, pull_request]
on:
push:
pull_request:
branches:
- '**:**'
jobs:
run:

View File

@ -1,6 +1,10 @@
name: Windows Unit Tests
on: [push, pull_request]
on:
push:
pull_request:
branches:
- '**:**'
jobs:
run: