ci: avoid duplicate CI runs

* run CI on push to master or synchronize PR
* cancel in-progress workflows for updated PR
This commit is contained in:
Christian Clason 2022-01-21 11:11:01 +01:00 committed by Stephan Seitz
parent bf59e0a3fb
commit b7d4d8a55d
2 changed files with 26 additions and 2 deletions

View file

@ -1,6 +1,18 @@
name: Parser compilation and query file check
on: [push, pull_request]
on:
push:
branches:
- 'master'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
check_compilation_unix_like:

View file

@ -1,6 +1,18 @@
name: Tests
on: [push, pull_request]
on:
push:
branches:
- 'master'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
check_compilation_unix_like: