ci: merge from main
This commit is contained in:
commit
142f61f327
|
@ -0,0 +1,25 @@
|
|||
name: Cancel Workflow on Merge or Close
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
cancel-workflow:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Workflow if Merged or Closed
|
||||
if: ${{ github.event.pull_request.merged || github.event.pull_request.state == 'closed' }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "PR has been merged or closed, cancelling workflow..."
|
||||
gh auth status
|
||||
gh run list \
|
||||
--repo ${{ github.repository }} \
|
||||
--branch ${{ github.event.pull_request.head.ref }} \
|
||||
--workflow "TDengine Test" \
|
||||
--status in_progress \
|
||||
--status queued \
|
||||
--json databaseId --jq '.[].databaseId' | \
|
||||
xargs -I {} gh run cancel --repo ${{ github.repository }} {}
|
|
@ -21,9 +21,10 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and test on ${{ matrix.os }}
|
||||
name: Run on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-20.04
|
|
@ -1,4 +1,4 @@
|
|||
name: TDengine CI Test
|
||||
name: TDengine Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -18,7 +18,7 @@ on:
|
|||
- 'tests/script/tsim/analytics'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-TDengine
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-TDengine
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
|
@ -5,4 +5,4 @@ ADD_SUBDIRECTORY(test/c)
|
|||
# ADD_SUBDIRECTORY(comparisonTest/tdengine)
|
||||
IF(NOT "${TSZ_ENABLED}" MATCHES "false")
|
||||
ADD_SUBDIRECTORY(TSZ)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
Loading…
Reference in New Issue