From 3ff66793d589d115f337fc5b4ba7eadf2f57f58e Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 14 May 2021 13:10:14 -0400 Subject: [PATCH 1/4] testing --- .github/workflows/test.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb919b2..a4b9201 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,14 @@ name: Test on: - pull_request_target: - branches: [ '🙄' ] + pull_request: push: - tags: [ testtag ] - jobs: job: - name: Test + name: Test expressions runs-on: ubuntu-latest steps: - - name: Env - run: env - - name: Event data - run: cat $GITHUB_EVENT_PATH + - name: Expr + env: + XXX: build-${{ github.event_name == 'push' && github.run_id || "pr" }}-${{ github.ref }} + run: echo "$XXX" From c6add079b30fc7ac884825d9acb1532c91bf656e Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 14 May 2021 13:11:48 -0400 Subject: [PATCH 2/4] oops --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4b9201..3cb3960 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,5 +10,5 @@ jobs: steps: - name: Expr env: - XXX: build-${{ github.event_name == 'push' && github.run_id || "pr" }}-${{ github.ref }} + XXX: build-${{ github.event_name == 'push' && github.run_id || 'pr' }}-${{ github.ref }} run: echo "$XXX" From 93fdfe2ca7c271ef2d36477465b5418f1621e7c8 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 14 May 2021 13:16:53 -0400 Subject: [PATCH 3/4] Test cross-job and cross-workflow concurrency --- .github/workflows/A.yml | 15 +++++++++++++++ .github/workflows/B.yml | 15 +++++++++++++++ .github/workflows/C.yml | 23 +++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 .github/workflows/A.yml create mode 100644 .github/workflows/B.yml create mode 100644 .github/workflows/C.yml diff --git a/.github/workflows/A.yml b/.github/workflows/A.yml new file mode 100644 index 0000000..91a41c6 --- /dev/null +++ b/.github/workflows/A.yml @@ -0,0 +1,15 @@ +name: A +on: + push: + +concurrency: + group: foo + cancel-in-progress: true + +jobs: + job: + name: A + runs-on: ubuntu-latest + steps: + - name: Sleep + run: sleep 20 diff --git a/.github/workflows/B.yml b/.github/workflows/B.yml new file mode 100644 index 0000000..bd8771b --- /dev/null +++ b/.github/workflows/B.yml @@ -0,0 +1,15 @@ +name: B +on: + push: + +concurrency: + group: foo + cancel-in-progress: true + +jobs: + job: + name: B + runs-on: ubuntu-latest + steps: + - name: Sleep + run: sleep 20 diff --git a/.github/workflows/C.yml b/.github/workflows/C.yml new file mode 100644 index 0000000..1e1a339 --- /dev/null +++ b/.github/workflows/C.yml @@ -0,0 +1,23 @@ +name: C +on: + push: + +jobs: + job1: + name: C1 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + job2: + name: C2 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 From 9aa8db57053c20802c29e3a3de89e2afcf1387d6 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Fri, 14 May 2021 13:21:12 -0400 Subject: [PATCH 4/4] more testing --- .github/workflows/C.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/C.yml b/.github/workflows/C.yml index 1e1a339..8b6b878 100644 --- a/.github/workflows/C.yml +++ b/.github/workflows/C.yml @@ -21,3 +21,33 @@ jobs: steps: - name: Sleep run: sleep 20 + job3: + name: C3 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + job4: + name: C4 + runs-on: ubuntu-latest + concurrency: + group: C + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20 + jobX: + name: matrix ${{matrix.n}} + runs-on: ubuntu-latest + strategy: + matrix: + n: [ 1, 2, 3, 4 ] + concurrency: + group: CM + cancel-in-progress: true + steps: + - name: Sleep + run: sleep 20