From a92428e57fc87c4e2a1a9d0c191125e4018c0770 Mon Sep 17 00:00:00 2001 From: Nick Hale <4175918+njhale@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:34:18 -0400 Subject: [PATCH 1/2] fix: auto run smoke tests for members The default GitHub workflow token isn't privileged enough to check org membership for PR authors. This prevents smoke tests for running automatically for org members. To fix this, switch to a PAT with the correct privileges for this check. Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> --- .github/workflows/smoke.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yaml b/.github/workflows/smoke.yaml index 5f0aee22..c213dca1 100644 --- a/.github/workflows/smoke.yaml +++ b/.github/workflows/smoke.yaml @@ -37,7 +37,7 @@ jobs: AUTHOR="${{ github.event.pull_request.user.login }}" # Check for org membership - MEMBERSHIP_RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + MEMBERSHIP_RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.SMOKE_GH_TOKEN }}" \ "https://api.github.com/orgs/$ORG/members/$AUTHOR") if [ "$MEMBERSHIP_RESPONSE_CODE" -eq 204 ]; then From ef449d2940ced168d9269eceafd358d3f09ba17c Mon Sep 17 00:00:00 2001 From: Nick Hale <4175918+njhale@users.noreply.github.com> Date: Fri, 21 Jun 2024 10:44:28 -0400 Subject: [PATCH 2/2] chore: de-stutter smoke job names Rename smoke test jobs to remove stutter; e.g. `smoke/smoke-` -> `smoke/`. Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> --- .github/workflows/smoke.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoke.yaml b/.github/workflows/smoke.yaml index c213dca1..abea2159 100644 --- a/.github/workflows/smoke.yaml +++ b/.github/workflows/smoke.yaml @@ -59,7 +59,7 @@ jobs: echo "run_smoke_tests=false" >> $GITHUB_OUTPUT - smoke-gpt-4o-2024-05-13: + gpt-4o-2024-05-13: needs: check-label if: ${{ needs.check-label.outputs.run_smoke_tests == 'true' }} runs-on: ubuntu-22.04 @@ -88,7 +88,7 @@ jobs: export PATH="$(pwd)/bin:${PATH}" make smoke - smoke-gpt-4-turbo-2024-04-09: + gpt-4-turbo-2024-04-09: needs: check-label if: ${{ needs.check-label.outputs.run_smoke_tests == 'true' }} runs-on: ubuntu-22.04 @@ -117,7 +117,7 @@ jobs: export PATH="$(pwd)/bin:${PATH}" make smoke - smoke-claude-3-opus-20240229: + claude-3-opus-20240229: needs: check-label if: ${{ needs.check-label.outputs.run_smoke_tests == 'true' }} runs-on: ubuntu-22.04 @@ -147,7 +147,7 @@ jobs: export PATH="$(pwd)/bin:${PATH}" make smoke - smoke-mistral-large-2402: + mistral-large-2402: needs: check-label if: ${{ needs.check-label.outputs.run_smoke_tests == 'true' }} runs-on: ubuntu-22.04