From 6921e60ecd239f606fa14dc5fd230e1c2040bb0d Mon Sep 17 00:00:00 2001 From: Tobias Ortmayr Date: Wed, 17 Jul 2024 10:21:40 +0200 Subject: [PATCH] Add cancel workflow and timeouts --- .github/workflows/ci-cancel.yml | 13 +++++++++++++ .github/workflows/ci.yml | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 .github/workflows/ci-cancel.yml diff --git a/.github/workflows/ci-cancel.yml b/.github/workflows/ci-cancel.yml new file mode 100644 index 0000000..83e3d9b --- /dev/null +++ b/.github/workflows/ci-cancel.yml @@ -0,0 +1,13 @@ +name: Cancel currently running CI workflows +on: + workflow_run: + workflows: ['CI'] + types: + - requested +jobs: + cancel: + runs-on: ubuntu-latest + steps: + - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa #v0.12.1 + with: + workflow_id: ${{ github.event.workflow.id }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 562f529..12a31b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: build: name: Build runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v4.1.7 - uses: actions/setup-node@v4.0.2 @@ -26,6 +27,7 @@ jobs: fi lint: name: Lint + timeout-minutes: 60 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.7 @@ -47,6 +49,7 @@ jobs: playwright: name: Playwright Tests + timeout-minutes: 120 runs-on: ubuntu-latest env: STANDALONE_URL: 'file://${{ github.workspace }}/examples/workflow-test/repositories/glsp-client/examples/workflow-standalone/app/diagram.html'