From 0935da18354d908152652156993f75e87964b4ec Mon Sep 17 00:00:00 2001 From: Robin Bryce Date: Thu, 14 Nov 2024 14:30:16 +0000 Subject: [PATCH 1/3] Does the workflow thing work for PR's ? --- unittests/test_create_hashed_signed_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/test_create_hashed_signed_statement.py b/unittests/test_create_hashed_signed_statement.py index 4ecd66f..3e66bd6 100644 --- a/unittests/test_create_hashed_signed_statement.py +++ b/unittests/test_create_hashed_signed_statement.py @@ -55,7 +55,7 @@ def test_sign_and_verify_statement(self): tests we can also verifiy that signed statement. """ - # XXX: TODO: Testing CI/CD infra: should still fail the Merge Requires check + # XXX: it should not be possible to merge until this is removed assert False is True # create the signed statement From 26b37a843ae266628ba03f4a2efbc53da99b7198 Mon Sep 17 00:00:00 2001 From: Robin Bryce Date: Thu, 14 Nov 2024 14:35:46 +0000 Subject: [PATCH 2/3] fix the fake test failure --- unittests/test_create_hashed_signed_statement.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/unittests/test_create_hashed_signed_statement.py b/unittests/test_create_hashed_signed_statement.py index 3e66bd6..81f1a2a 100644 --- a/unittests/test_create_hashed_signed_statement.py +++ b/unittests/test_create_hashed_signed_statement.py @@ -55,9 +55,6 @@ def test_sign_and_verify_statement(self): tests we can also verifiy that signed statement. """ - # XXX: it should not be possible to merge until this is removed - assert False is True - # create the signed statement signing_key = SigningKey.generate(curve=NIST256p) From bff301e13ae6b761d61ccbd8fd5b7284aa9707aa Mon Sep 17 00:00:00 2001 From: Robin Bryce Date: Thu, 14 Nov 2024 19:03:54 +0000 Subject: [PATCH 3/3] workflow dependencies experiment --- .github/workflows/ci.yml | 3 +-- .github/workflows/merge-requires.yml | 34 ++++++++++------------------ .github/workflows/package.yml | 3 +-- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 873539d..cf0b67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,7 @@ name: Build and test on: - push: - + workflow_call: jobs: build: strategy: diff --git a/.github/workflows/merge-requires.yml b/.github/workflows/merge-requires.yml index 0a0bc03..4d060e1 100644 --- a/.github/workflows/merge-requires.yml +++ b/.github/workflows/merge-requires.yml @@ -5,29 +5,19 @@ # appropriate to satisfy that check. name: Merge Requires on: - workflow_run: - workflows: - - Build and test - - Package and Publish - types: - - completed + push: jobs: + ci: + secrets: inherit + uses: ./github/workflows/ci.yml + release: + secrets: inherit + uses: ./github/workflows/package.yml + merge-checks-ok: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - - run: | - echo 'The merge check passed' - echo ${{ github.event.workflow_run.name }} - echo ${{ github.event.workflow_run.url }} + needs: [ci] - merge-checks-failed: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' }} - steps: - - run: | - echo 'The merge check failed' - echo ${{ github.event.workflow_run.name }} - echo ${{ github.event.workflow_run.url }} - exit 1 + release-checks-ok: + if: ${{ github.event_name == 'release' }} + needs: [ci, release] \ No newline at end of file diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 00be301..738a70e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,8 +4,7 @@ name: Package and Publish on: - pull_request: - release: + workflow_call: jobs: build: