From 63256c122f96ca2dd18196d01af26b16037bcce0 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 15:53:38 +0900 Subject: [PATCH 01/15] gh-263: Run Python 3.12 task as the experimental task --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38e65c91..67ad3eb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,12 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] - python: ["3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev] + python: ["3.7", "3.8", "3.9", "3.10", "3.11"] include: + # Handling as the experimental job + - os: ubuntu-latest + python: "3.12-dev" + experimental: true # Also test PyPy, macOS, and Windows: - os: ubuntu-latest python: pypy-3.9 From 41403514ba824f8a9e550248f26788013dfaf102 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 15:57:12 +0900 Subject: [PATCH 02/15] Add continue-on-error flag --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67ad3eb8..b9bfa9cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,12 +15,14 @@ jobs: test: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} - ${{ matrix.python }} + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + experimental: [false] include: # Handling as the experimental job - os: ubuntu-latest @@ -29,14 +31,19 @@ jobs: # Also test PyPy, macOS, and Windows: - os: ubuntu-latest python: pypy-3.9 + experimental: false - os: ubuntu-latest python: pypy-3.8 + experimental: false - os: ubuntu-latest python: pypy-3.7 + experimental: false - os: macos-latest python: "3.10" + experimental: false - os: windows-latest python: "3.10" + experimental: false steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python }} From c4ef3ee73b3843246ade872045ff6bfedc37391c Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 16:15:07 +0900 Subject: [PATCH 03/15] Add extra pipeline --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9bfa9cc..0e799e51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: python: ["3.7", "3.8", "3.9", "3.10", "3.11"] experimental: [false] include: - # Handling as the experimental job + # As the experimental task for the dev version. - os: ubuntu-latest python: "3.12-dev" experimental: true @@ -66,3 +66,9 @@ jobs: run: python -c "import sys; print(sys.version)" - name: Run Tests run: python -u -m pyperformance.tests + - name: Notify result for experimental tasks + uses: thollander/actions-comment-pull-request@v2 + if: failure() && ${{ matrix.experimental }} == true + with: + message: | + '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' From 3abdfe0fed9b1deb7d7020cb026c3f399f1982f0 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 16:41:23 +0900 Subject: [PATCH 04/15] Add permission --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e799e51..e231b7f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,12 @@ on: - cron: "0 0 * * *" workflow_dispatch: +permissions: + id-token: write + contents: read + issues: write + pull-requests: write + jobs: test: From 1c339244ccce9131553e507d892737a3201a75c9 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 17:04:32 +0900 Subject: [PATCH 05/15] Update pipeline --- .github/workflows/main.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e231b7f5..68bc90b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,18 +10,13 @@ on: - cron: "0 0 * * *" workflow_dispatch: -permissions: - id-token: write - contents: read - issues: write - pull-requests: write - jobs: test: + permissions: + pull-requests: write runs-on: ${{ matrix.os }} name: ${{ matrix.os }} - ${{ matrix.python }} - continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: @@ -72,9 +67,16 @@ jobs: run: python -c "import sys; print(sys.version)" - name: Run Tests run: python -u -m pyperformance.tests - - name: Notify result for experimental tasks + continue-on-error: ${{ matrix.experimental }} + - name: Notify result for experimental tasks (Failure) uses: thollander/actions-comment-pull-request@v2 if: failure() && ${{ matrix.experimental }} == true with: message: | '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' + - name: Notify result for experimental tasks (Success) + uses: thollander/actions-comment-pull-request@v2 + if: success() && ${{ matrix.experimental }} == true + with: + message: | + '${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag.' From bd5da95cb6536036f97e2f3d233f6ec8058cae2d Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 17:45:31 +0900 Subject: [PATCH 06/15] Permission test --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68bc90b7..ca1c5e43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,11 +10,12 @@ on: - cron: "0 0 * * *" workflow_dispatch: +# test +permissions: write-all + jobs: test: - permissions: - pull-requests: write runs-on: ${{ matrix.os }} name: ${{ matrix.os }} - ${{ matrix.python }} strategy: From 1aafc03b4f2b39f91df86395f662685f4ca245f3 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 17:57:51 +0900 Subject: [PATCH 07/15] fix condition --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca1c5e43..ea49948e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,13 +71,13 @@ jobs: continue-on-error: ${{ matrix.experimental }} - name: Notify result for experimental tasks (Failure) uses: thollander/actions-comment-pull-request@v2 - if: failure() && ${{ matrix.experimental }} == true + if: ${{ failure() && matrix.experimental }} with: message: | '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' - name: Notify result for experimental tasks (Success) uses: thollander/actions-comment-pull-request@v2 - if: success() && ${{ matrix.experimental }} == true + if: ${{ success() && matrix.experimental }} with: message: | '${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag.' From d1661c17fc5fd6da566af23bcdb34fb1699eabcb Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 18:14:29 +0900 Subject: [PATCH 08/15] Modify condition --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea49948e..c1816767 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,17 +67,18 @@ jobs: - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Run Tests + id: pyperformance run: python -u -m pyperformance.tests continue-on-error: ${{ matrix.experimental }} - name: Notify result for experimental tasks (Failure) uses: thollander/actions-comment-pull-request@v2 - if: ${{ failure() && matrix.experimental }} + if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' - name: Notify result for experimental tasks (Success) uses: thollander/actions-comment-pull-request@v2 - if: ${{ success() && matrix.experimental }} + if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} with: message: | '${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag.' From 13150c5f98e24b3d1fd19b1e36f3b773b0a9486b Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 18:27:21 +0900 Subject: [PATCH 09/15] Use other GA tool --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1816767..636be8da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,13 +71,13 @@ jobs: run: python -u -m pyperformance.tests continue-on-error: ${{ matrix.experimental }} - name: Notify result for experimental tasks (Failure) - uses: thollander/actions-comment-pull-request@v2 + uses: marocchino/sticky-pull-request-comment@v2 if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' - name: Notify result for experimental tasks (Success) - uses: thollander/actions-comment-pull-request@v2 + uses: marocchino/sticky-pull-request-comment@v2 if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} with: message: | From 757d8e24b59378c5d26970df53478c596d3d17ce Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 18:39:17 +0900 Subject: [PATCH 10/15] test permission --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 636be8da..9e97f5ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,13 +10,12 @@ on: - cron: "0 0 * * *" workflow_dispatch: -# test -permissions: write-all - jobs: test: runs-on: ${{ matrix.os }} + permissions: + pull-requests: write name: ${{ matrix.os }} - ${{ matrix.python }} strategy: fail-fast: false From 36e7547277908318729bee056d1dca22bd43344d Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 19:39:09 +0900 Subject: [PATCH 11/15] Remove quote --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e97f5ff..eaa162e2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,10 +74,10 @@ jobs: if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | - '${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task.' + ${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task. - name: Notify result for experimental tasks (Success) uses: marocchino/sticky-pull-request-comment@v2 if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} with: message: | - '${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag.' + ${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag. From 67a7c6865016e6271e4076be208d88d90bf57433 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 20:37:34 +0900 Subject: [PATCH 12/15] Update message --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eaa162e2..e4d7d4f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,10 +74,10 @@ jobs: if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | - ${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task. + ❌: ${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task. - name: Notify result for experimental tasks (Success) uses: marocchino/sticky-pull-request-comment@v2 if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} with: message: | - ${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag. + ✅: ${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag. From 49a6ff8e3b0ccd072937eb4d0525d10ddc3715b3 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 21:34:15 +0900 Subject: [PATCH 13/15] Update .github/workflows/main.yml Co-authored-by: Hugo van Kemenade --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4d7d4f4..1f5ab690 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | - ❌: ${{ matrix.os }} - ${{ matrix.python }} is failed, but allowed as the experimental task. + ❌: ${{ matrix.os }} - ${{ matrix.python }} has failed, but allowed as the experimental task. - name: Notify result for experimental tasks (Success) uses: marocchino/sticky-pull-request-comment@v2 if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} From 065be27c0cc8c2e1bcc721b10e72fc2fcd413db9 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 21:34:22 +0900 Subject: [PATCH 14/15] Update .github/workflows/main.yml Co-authored-by: Hugo van Kemenade --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1f5ab690..c61d83cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} - name: Notify result for experimental tasks (Failure) uses: marocchino/sticky-pull-request-comment@v2 - if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} + if: ${{ steps.pyperformance.outcome != 'success' && matrix.experimental }} with: message: | ❌: ${{ matrix.os }} - ${{ matrix.python }} has failed, but allowed as the experimental task. From 4e7712c1976abe56df4e60f280165c3837db7bfa Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Wed, 19 Apr 2023 21:34:47 +0900 Subject: [PATCH 15/15] Update .github/workflows/main.yml Co-authored-by: Hugo van Kemenade --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c61d83cb..44dbdfca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,4 +80,4 @@ jobs: if: ${{ steps.pyperformance.outcome == 'success' && matrix.experimental }} with: message: | - ✅: ${{ matrix.os }} - ${{ matrix.python }} is passed, now we can disable experimental flag. + ✅: ${{ matrix.os }} - ${{ matrix.python }} has passed, now we can disable the experimental flag.