From b7d4d8a55d65d0ef3ea06252c6407f47240ab94a Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 21 Jan 2022 11:11:01 +0100 Subject: ci: avoid duplicate CI runs * run CI on push to master or synchronize PR * cancel in-progress workflows for updated PR --- .github/workflows/check-query-files-and-compilation.yml | 14 +++++++++++++- .github/workflows/tests.yml | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/check-query-files-and-compilation.yml b/.github/workflows/check-query-files-and-compilation.yml index 05bf623b5..09c1ed6d2 100644 --- a/.github/workflows/check-query-files-and-compilation.yml +++ b/.github/workflows/check-query-files-and-compilation.yml @@ -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: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 74e78c884..0a19311d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: -- cgit v1.2.3-70-g09d2