From aba02dd9b5b7dc8a7e6d07bdf6145e551ca9b9f2 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 18:48:41 -0400 Subject: [PATCH 1/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 59 ++---------------------------- 1 file changed, 3 insertions(+), 56 deletions(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index 15fbebcb..593d8950 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -8,85 +8,34 @@ on: branches: [ main ] # Also run on direct pushes to main jobs: - check-approval: - name: Check if PR has contributor approval - runs-on: ubuntu-latest - permissions: - pull-requests: read - # Skip this check for direct pushes to main - if: github.event_name == 'pull_request' - outputs: - approved: ${{ steps.check-approval.outputs.approved }} - steps: - - name: Check if PR has been approved by a contributor - id: check-approval - uses: actions/github-script@v7 - with: - script: | - const APPROVED_ASSOCIATION = ['COLLABORATOR', 'CONTRIBUTOR', 'MEMBER', 'OWNER'] - const PR_AUTHOR_ASSOCIATION = context.payload.pull_request.author_association; - const { data: reviews } = await github.rest.pulls.listReviews({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - - const isApprovedContributor = APPROVED_ASSOCIATION.includes(PR_AUTHOR_ASSOCIATION); - - // Check if any contributor has approved - const isApproved = reviews.some(review => - review.state === 'APPROVED' && APPROVED_ASSOCIATION.includes(review.author_association) - ) || isApprovedContributor; - - core.setOutput('approved', isApproved); - - if (!isApproved) { - core.notice('This PR does not have approval from a Contributor. Workflow will not run test jobs.'); - return false; - } - - return true; - unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.os-name }} - needs: check-approval + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ runner.os }} permissions: contents: read - # Only run if PR is approved or this is a direct push to main - if: github.event_name == 'push' || needs.check-approval.outputs.approved == 'true' strategy: matrix: include: # Linux - os: ubuntu-latest - os-name: linux python-version: "3.10" - os: ubuntu-latest - os-name: linux python-version: "3.11" - os: ubuntu-latest - os-name: linux python-version: "3.12" - os: ubuntu-latest - os-name: linux python-version: "3.13" # Windows - os: windows-latest - os-name: windows python-version: "3.10" - os: windows-latest - os-name: windows python-version: "3.11" - os: windows-latest - os-name: windows python-version: "3.12" - os: windows-latest - os-name: windows python-version: "3.13" - # MacOS - latest only; not enough runners for MacOS + # MacOS - latest only; not enough runners for macOS - os: macos-latest - os-name: macos - python-version: "3.13" + python-version: "3.13" fail-fast: false runs-on: ${{ matrix.os }} env: @@ -112,10 +61,8 @@ jobs: lint: name: Lint runs-on: ubuntu-latest - needs: check-approval permissions: contents: read - if: github.event_name == 'push' || needs.check-approval.outputs.approved == 'true' steps: - name: Checkout code uses: actions/checkout@v4 From e02d5c30dce5a699de0c65539aa31eda0337f17a Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 18:50:11 -0400 Subject: [PATCH 2/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 262dde51..e3cc89ef 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +test # Strands Agents
From acccb82f006f1db0d63300336a33f9c079c03f91 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 18:52:53 -0400 Subject: [PATCH 3/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index 593d8950..07087f85 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ runner.os }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ env.RUNNER_OS }} permissions: contents: read strategy: From 3b596e7be902dd747381359e00aceb401a075fc3 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:00:09 -0400 Subject: [PATCH 4/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index 07087f85..a24afd2d 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ env.RUNNER_OS }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ RUNNER_OS }} permissions: contents: read strategy: From 16ab07d18500e9155999398a9fd5f22f7cc156d6 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:04:17 -0400 Subject: [PATCH 5/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index a24afd2d..01541b00 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ RUNNER_OS }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.runner.os }} permissions: contents: read strategy: From 4d24a1b76ec6583575de52ed5b477212382b4601 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:04:58 -0400 Subject: [PATCH 6/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index 01541b00..efbfdc2f 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.runner.os }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.env.RUNNER_OS }} permissions: contents: read strategy: From 8c82e866ab35f9a9d927b985a7a9ec1fa5072b51 Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:08:38 -0400 Subject: [PATCH 7/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index efbfdc2f..c1be9393 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.env.RUNNER_OS }} + run-name: Unit Tests - Python ${{ matrix.python-version }} - ${{ github.env.RUNNER_OS }} permissions: contents: read strategy: From b7db5c9909eccee33b7ae2f278cb8a516611678b Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:09:11 -0400 Subject: [PATCH 8/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index c1be9393..82202f28 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -9,7 +9,7 @@ on: jobs: unit-test: - run-name: Unit Tests - Python ${{ matrix.python-version }} - ${{ github.env.RUNNER_OS }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ github.env.RUNNER_OS }} permissions: contents: read strategy: From 30a56772fea6a0bf65c32ac729e40a63ff9a747b Mon Sep 17 00:00:00 2001 From: Jonathan Segev Date: Tue, 20 May 2025 19:33:51 -0400 Subject: [PATCH 9/9] fix: Updated GitHub Action to relay only on GitHub native approvals to run workflows --- .github/workflows/test-lint-pr.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-lint-pr.yml b/.github/workflows/test-lint-pr.yml index 82202f28..d5c09a50 100644 --- a/.github/workflows/test-lint-pr.yml +++ b/.github/workflows/test-lint-pr.yml @@ -6,10 +6,13 @@ on: types: [opened, synchronize, reopened, ready_for_review, review_requested, review_request_removed] push: branches: [ main ] # Also run on direct pushes to main +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: unit-test: - name: Unit Tests - Python ${{ matrix.python-version }} - ${{ github.env.RUNNER_OS }} + name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.os-name }} permissions: contents: read strategy: @@ -17,26 +20,35 @@ jobs: include: # Linux - os: ubuntu-latest + os-name: 'linux' python-version: "3.10" - os: ubuntu-latest + os-name: 'linux' python-version: "3.11" - os: ubuntu-latest + os-name: 'linux' python-version: "3.12" - os: ubuntu-latest + os-name: 'linux' python-version: "3.13" # Windows - os: windows-latest + os-name: 'windows' python-version: "3.10" - os: windows-latest + os-name: 'windows' python-version: "3.11" - os: windows-latest + os-name: 'windows' python-version: "3.12" - os: windows-latest + os-name: 'windows' python-version: "3.13" # MacOS - latest only; not enough runners for macOS - os: macos-latest + os-name: 'macOS' python-version: "3.13" - fail-fast: false + fail-fast: true runs-on: ${{ matrix.os }} env: LOG_LEVEL: DEBUG