From d74ce3008f1818daf4c6749b885f83ba248404d9 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 07:58:59 +0200 Subject: [PATCH 01/14] manual test workflow for composite action Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/test-action.yml diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml new file mode 100644 index 0000000..151104d --- /dev/null +++ b/.github/workflows/test-action.yml @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: Contributors to the Power Grid Model project +# +# SPDX-License-Identifier: MPL-2.0 + +name: Test the Action + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-test-action + cancel-in-progress: true + +jobs: + reuse-compliance-check: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Set PyPI Version + uses: PowerGridModel/pgm-version-bump@main + with: + token: ${{ secrets.GITHUB_TOKEN }} From b98d9b75f5ec9ef1b2b66fcf870dbbf2b62527e6 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:07:04 +0200 Subject: [PATCH 02/14] also run automatically Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 151104d..1a43e9a 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -5,6 +5,13 @@ name: Test the Action on: + # run pipeline on push event of main branch + push: + branches: + - main + # run pipeline on pull request + pull_request: + # run pipeline on merge queue workflow_dispatch: concurrency: From 6d4cdb8fdf4d34b0a0a3c7eef88ee424a67cfc76 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:07:33 +0200 Subject: [PATCH 03/14] add blocking labels check Signed-off-by: Martijn Govers --- .github/workflows/check-blocking-labels.yml | 46 +++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/check-blocking-labels.yml diff --git a/.github/workflows/check-blocking-labels.yml b/.github/workflows/check-blocking-labels.yml new file mode 100644 index 0000000..56eba1f --- /dev/null +++ b/.github/workflows/check-blocking-labels.yml @@ -0,0 +1,46 @@ +# SPDX-FileCopyrightText: Contributors to the Power Grid Model project +# +# SPDX-License-Identifier: MPL-2.0 + +name: Check Blocking Labels + +on: + # run pipeline on pull request + pull_request: + types: + - opened + - synchronize + - labeled + - unlabeled + # run pipeline on merge queue + merge_group: + # run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-blocking-labels + cancel-in-progress: true + +jobs: + check-blocking-labels: + runs-on: ubuntu-latest + steps: + + - name: do-not-merge + if: contains(github.event.pull_request.labels.*.name, 'do-not-merge') + run: | + echo "This pull request should not be merged (do-not-merge)" + exit 1 + + - name: merge-target-first + if: contains(github.event.pull_request.labels.*.name, 'merge-target-first') + run: | + echo "The target branch of this PR should be merged first (merge-target-first)" + exit 2 + + - name: needs-unit-tests + if: contains(github.event.pull_request.labels.*.name, 'needs-unit-tests') + run: | + echo "This pull request needs (more) unit tests before it may be merged (needs-unit-tests)" + exit 3 + \ No newline at end of file From e4b7360be85083cfbe528f1e0e675c68d441f917 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:10:51 +0200 Subject: [PATCH 04/14] minor fix Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 1a43e9a..33aeeee 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -19,7 +19,7 @@ concurrency: cancel-in-progress: true jobs: - reuse-compliance-check: + test-pgm-version-bump: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -30,5 +30,3 @@ jobs: - name: Set PyPI Version uses: PowerGridModel/pgm-version-bump@main - with: - token: ${{ secrets.GITHUB_TOKEN }} From 20db833aafbc62eda422c47f5720d1fbe97c2652 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:22:19 +0200 Subject: [PATCH 05/14] add version Signed-off-by: Martijn Govers --- VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..ba66466 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0 From cc7e21317e9e3336baf9ecd11a627a7d16d5a93b Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:23:26 +0200 Subject: [PATCH 06/14] add license Signed-off-by: Martijn Govers --- VERSION.license | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 VERSION.license diff --git a/VERSION.license b/VERSION.license new file mode 100644 index 0000000..7601059 --- /dev/null +++ b/VERSION.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: Contributors to the Power Grid Model project + +SPDX-License-Identifier: MPL-2.0 From 0c06f3873d779f403d8c025caf3ac16cc39b51a7 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:25:17 +0200 Subject: [PATCH 07/14] show the resulting version Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 33aeeee..1d26d9e 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -29,4 +29,7 @@ jobs: python-version: "3.12" - name: Set PyPI Version - uses: PowerGridModel/pgm-version-bump@main + uses: PowerGridModel/pgm-version-bump@ + + - name: Low latest version + run: cat PYPI_VERSION From 0614ec8c7279dd1d3a96eb25aa9f3aab7e32cdf7 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:28:45 +0200 Subject: [PATCH 08/14] actually use the current version of the workflow file Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 1d26d9e..84409dc 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -29,7 +29,7 @@ jobs: python-version: "3.12" - name: Set PyPI Version - uses: PowerGridModel/pgm-version-bump@ + uses: ./ - name: Low latest version run: cat PYPI_VERSION From e88992c81a53f5e2752a4a01a23cf4063e452871 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:30:42 +0200 Subject: [PATCH 09/14] tests Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 6 +----- action.yml | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 84409dc..41787df 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -24,12 +24,8 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - name: Set PyPI Version uses: ./ - - name: Low latest version + - name: Sow latest version run: cat PYPI_VERSION diff --git a/action.yml b/action.yml index b433b70..b72d8fc 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,9 @@ description: Retrieve the latest release tag, run the Bash script to bump versio runs: using: "composite" steps: + - name: Show that the correct action from the correct SHA is used + cat: "This works" + - name: Get Latest Release Tag id: fetch_tag uses: pozetroninc/github-action-get-latest-release@master From d1054cd8ce644033fe3e1d0678b4b6d7e1ab7305 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:31:37 +0200 Subject: [PATCH 10/14] minor Signed-off-by: Martijn Govers --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b72d8fc..bd6ce90 100644 --- a/action.yml +++ b/action.yml @@ -8,7 +8,7 @@ runs: using: "composite" steps: - name: Show that the correct action from the correct SHA is used - cat: "This works" + run: echo "This works" - name: Get Latest Release Tag id: fetch_tag From 8d4e31dad6ddfc2ff51c5ded595dd23a0a1edfe9 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:43:45 +0200 Subject: [PATCH 11/14] minor bis Signed-off-by: Martijn Govers --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index bd6ce90..b44d5b8 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,7 @@ runs: using: "composite" steps: - name: Show that the correct action from the correct SHA is used + shell: bash run: echo "This works" - name: Get Latest Release Tag From 73db202b013fe758d5b5bd68d37da15561f67855 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:45:08 +0200 Subject: [PATCH 12/14] fix typo Signed-off-by: Martijn Govers --- .github/workflows/test-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 41787df..0a8cc05 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -27,5 +27,5 @@ jobs: - name: Set PyPI Version uses: ./ - - name: Sow latest version + - name: Show latest version run: cat PYPI_VERSION From 739126a3e2dd40731cc1dcd74b8a4377b698c4b7 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:48:43 +0200 Subject: [PATCH 13/14] remove test logic Signed-off-by: Martijn Govers --- action.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/action.yml b/action.yml index b44d5b8..b433b70 100644 --- a/action.yml +++ b/action.yml @@ -7,10 +7,6 @@ description: Retrieve the latest release tag, run the Bash script to bump versio runs: using: "composite" steps: - - name: Show that the correct action from the correct SHA is used - shell: bash - run: echo "This works" - - name: Get Latest Release Tag id: fetch_tag uses: pozetroninc/github-action-get-latest-release@master From 40095e5c4f40572f1bc7c9218a2cf3f252ff4cea Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 1 May 2025 08:49:37 +0200 Subject: [PATCH 14/14] reformat Signed-off-by: Martijn Govers --- .github/workflows/check-blocking-labels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-blocking-labels.yml b/.github/workflows/check-blocking-labels.yml index 56eba1f..0873a2a 100644 --- a/.github/workflows/check-blocking-labels.yml +++ b/.github/workflows/check-blocking-labels.yml @@ -43,4 +43,3 @@ jobs: run: | echo "This pull request needs (more) unit tests before it may be merged (needs-unit-tests)" exit 3 - \ No newline at end of file