From 317cdab880c8ce4a29f356e14124be3e7c8eb0aa Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 08:46:17 -0500 Subject: [PATCH 01/24] add accessibility-tests workflow --- .github/workflows/accessibility-tests.yml | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/accessibility-tests.yml diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml new file mode 100644 index 000000000000..2f6f643ec67e --- /dev/null +++ b/.github/workflows/accessibility-tests.yml @@ -0,0 +1,27 @@ +name: Trigger Accessibility Tests + +on: + pull_request_review: + +jobs: + print-info: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - run: echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}" + + accessibility-tests: + name: Execute accessibility tests + if: github.event_name == 'pull_request_review' && contains(github.event.review.body, 'please run accessibility tests') + + runs-on: ubuntu-latest + + steps: + - name: Execute accessibility tests + id: a11y-tests + uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + with: + repository: ${{ github.repository }} + ref: ${{ github.event.pull_request.head.sha }} From f9495fb9b687431e374b13be1cad355919245ffb Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 09:05:55 -0500 Subject: [PATCH 02/24] pull_request_review -> issue_comment --- .github/workflows/accessibility-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 2f6f643ec67e..7dd421cf8e16 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -1,7 +1,7 @@ -name: Trigger Accessibility Tests +name: Accessibility Tests On Demand on: - pull_request_review: + issue_comment: jobs: print-info: @@ -14,7 +14,7 @@ jobs: accessibility-tests: name: Execute accessibility tests - if: github.event_name == 'pull_request_review' && contains(github.event.review.body, 'please run accessibility tests') + if: github.event.issue.pull_request && github.event.comment == 'please run accessibility tests' runs-on: ubuntu-latest From bdcb95ce3555ab29e9a2cdb59546b8f5c8d19592 Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 09:11:55 -0500 Subject: [PATCH 03/24] comment.body --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 7dd421cf8e16..5bdd22ce9b03 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -14,7 +14,7 @@ jobs: accessibility-tests: name: Execute accessibility tests - if: github.event.issue.pull_request && github.event.comment == 'please run accessibility tests' + if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' runs-on: ubuntu-latest From b819d404c7a2bd439cdd79c6b5ec078868da71f0 Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 09:43:36 -0500 Subject: [PATCH 04/24] event.issue.pull_request --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 5bdd22ce9b03..0f886a2a528a 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -24,4 +24,4 @@ jobs: uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main with: repository: ${{ github.repository }} - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.issue.pull_request.head.sha }} From 6c8db57b04905c7c3e2df89c6b2262d58243da68 Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 09:46:05 -0500 Subject: [PATCH 05/24] update job print info --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 0f886a2a528a..5f7b83ebc8fc 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -10,7 +10,7 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}" + - run: echo "#️⃣ github.event.issue.pull_request.head.sha = ${{ github.event.issue.pull_request.head.sha }}" accessibility-tests: name: Execute accessibility tests From 033bc0817f00d361bfa79a5d7198ae4e6ace102a Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 15:09:03 -0500 Subject: [PATCH 06/24] correct path to reusable workflow --- .github/workflows/accessibility-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 5f7b83ebc8fc..2d89692eb6e3 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -5,12 +5,13 @@ on: jobs: print-info: + if: github.event.issue.pull_request runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "#️⃣ github.event.issue.pull_request.head.sha = ${{ github.event.issue.pull_request.head.sha }}" + - run: echo "#️⃣ github.event.issue.pull_request = ${{ github.event.issue.pull_request }}" accessibility-tests: name: Execute accessibility tests @@ -21,7 +22,7 @@ jobs: steps: - name: Execute accessibility tests id: a11y-tests - uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test@main with: repository: ${{ github.repository }} ref: ${{ github.event.issue.pull_request.head.sha }} From eebfb1555517f1970b11007fd36c3ee023640d09 Mon Sep 17 00:00:00 2001 From: foo Date: Thu, 13 Oct 2022 15:31:34 -0500 Subject: [PATCH 07/24] reusable workflow must have suffix and cannot be inside a step --- .github/workflows/accessibility-tests.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 2d89692eb6e3..933d150caf94 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -16,13 +16,7 @@ jobs: accessibility-tests: name: Execute accessibility tests if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' - - runs-on: ubuntu-latest - - steps: - - name: Execute accessibility tests - id: a11y-tests - uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test@main - with: - repository: ${{ github.repository }} - ref: ${{ github.event.issue.pull_request.head.sha }} + uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test.yml@main + with: + repository: ${{ github.repository }} + ref: ${{ github.event.issue.pull_request.head.sha }} From 02fb61ba49eaa8ded8f8368f93a8e3b89fe44faf Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 11:51:12 -0500 Subject: [PATCH 08/24] use action instead of workflow --- .github/workflows/accessibility-tests.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 933d150caf94..549eed5a00a2 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -11,12 +11,14 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "#️⃣ github.event.issue.pull_request = ${{ github.event.issue.pull_request }}" + - run: echo "#️⃣ github.event.issue.pull_request = ${{ toJSON(github.event.issue.pull_request) }}" accessibility-tests: - name: Execute accessibility tests - if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' - uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test.yml@main - with: - repository: ${{ github.repository }} - ref: ${{ github.event.issue.pull_request.head.sha }} + runs-on: ubuntu-latest + steps: + - name: Execute accessibility tests + if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' + uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + with: + repository: ${{ github.repository }} + ref: ${{ github.event.issue.pull_request.head.sha }} From 0b095f934be22797dc2b89a8fafe48e37a647753 Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 16:04:42 -0500 Subject: [PATCH 09/24] dump github to json --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 549eed5a00a2..b29d8ff87e56 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -11,7 +11,7 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "#️⃣ github.event.issue.pull_request = ${{ toJSON(github.event.issue.pull_request) }}" + - run: echo "#️⃣ github = ${{ toJSON(github) }}" accessibility-tests: runs-on: ubuntu-latest From 1fc2d34279e35773f7b8d6598d23944e6f942421 Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 17:15:17 -0500 Subject: [PATCH 10/24] get sha from pr number --- .github/workflows/accessibility-tests.yml | 26 +++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index b29d8ff87e56..9dde17ce957d 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -6,19 +6,31 @@ on: jobs: print-info: if: github.event.issue.pull_request + needs: pr_sha_from_number runs-on: ubuntu-latest steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "#️⃣ github = ${{ toJSON(github) }}" + - run: echo "☎️ GitHub API Request, outputs.data = ${{ needs.pr_sha_from_number.outputs.data }}" + - run: echo "#️⃣ PR head sha? = ${{ fromJSON(needs.pr_sha_from_number.outputs.data).head.sha }}" - accessibility-tests: + pr_sha_from_number: + if: github.event.issue.pull_request runs-on: ubuntu-latest steps: - - name: Execute accessibility tests - if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' - uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + - name: GitHub API Request + uses: octokit/request-action@v2.1.0 with: - repository: ${{ github.repository }} - ref: ${{ github.event.issue.pull_request.head.sha }} + route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + accessibility-tests: + name: Execute accessibility tests + if: github.event.issue.pull_request && github.event.comment.body == 'please run accessibility tests' + needs: pr_sha_from_number + uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test.yml@main + with: + repository: ${{ github.repository }} + ref: ${{ fromJSON(needs.pr_sha_from_number.outputs.data).head.sha }} From 5a4acbbe6a71efad79cad76b668f2e5ca02273a8 Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 17:25:55 -0500 Subject: [PATCH 11/24] use fromJSON --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 9dde17ce957d..c2348cd084f7 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -12,7 +12,7 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "☎️ GitHub API Request, outputs.data = ${{ needs.pr_sha_from_number.outputs.data }}" + - run: echo outputs.data ${{ needs.pr_sha_from_number.outputs.data }} - run: echo "#️⃣ PR head sha? = ${{ fromJSON(needs.pr_sha_from_number.outputs.data).head.sha }}" pr_sha_from_number: From 8cc9c0f08e79f2eeb4a47bd6266bb13dc6edc688 Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 20:26:14 -0500 Subject: [PATCH 12/24] connect step output to job output --- .github/workflows/accessibility-tests.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index c2348cd084f7..089415f0197f 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -12,19 +12,24 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo outputs.data ${{ needs.pr_sha_from_number.outputs.data }} - - run: echo "#️⃣ PR head sha? = ${{ fromJSON(needs.pr_sha_from_number.outputs.data).head.sha }}" + - run: echo "outputs.sha ${{ needs.pr_sha_from_number.outputs.sha }}" pr_sha_from_number: if: github.event.issue.pull_request runs-on: ubuntu-latest + outputs: + sha: ${{ fromJSON(steps.get_pr.outputs.data).head.sha }} steps: - - name: GitHub API Request + - id: get_pr + name: GitHub API Request uses: octokit/request-action@v2.1.0 with: route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Echo outputs.data + run: | + echo ${{ steps.get_pr.outputs.data }} accessibility-tests: name: Execute accessibility tests From 91d514a1795cf0c64de62219675cb1ccea906e7f Mon Sep 17 00:00:00 2001 From: foo Date: Fri, 14 Oct 2022 22:30:07 -0500 Subject: [PATCH 13/24] quote output --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 089415f0197f..dcb31d12ce27 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -29,7 +29,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Echo outputs.data run: | - echo ${{ steps.get_pr.outputs.data }} + echo '${{ steps.get_pr.outputs.data }}' accessibility-tests: name: Execute accessibility tests From f3bab13bdc468a58922e423efa3a5fa64e7e818c Mon Sep 17 00:00:00 2001 From: foo Date: Sat, 15 Oct 2022 00:54:02 -0500 Subject: [PATCH 14/24] dont know why the echo command fails, shrug --- .github/workflows/accessibility-tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index dcb31d12ce27..d1f98b724f6d 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -22,14 +22,11 @@ jobs: steps: - id: get_pr name: GitHub API Request - uses: octokit/request-action@v2.1.0 + uses: octokit/request-action@v2.1.7 with: route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Echo outputs.data - run: | - echo '${{ steps.get_pr.outputs.data }}' accessibility-tests: name: Execute accessibility tests From 011623f23374c7624a825b2bde674749fe7b6486 Mon Sep 17 00:00:00 2001 From: foo Date: Sat, 15 Oct 2022 12:15:33 -0500 Subject: [PATCH 15/24] grrr --- .github/workflows/accessibility-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index d1f98b724f6d..3c56ba548ddb 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -35,4 +35,4 @@ jobs: uses: gabalafou/jupyter-a11y-testing/.github/workflows/jlab-a11y-test.yml@main with: repository: ${{ github.repository }} - ref: ${{ fromJSON(needs.pr_sha_from_number.outputs.data).head.sha }} + ref: ${{ needs.pr_sha_from_number.outputs.sha }} From 63a39af9a643a7b67d19ba7ee61d2c317a86df00 Mon Sep 17 00:00:00 2001 From: foo Date: Wed, 19 Oct 2022 20:51:53 -0500 Subject: [PATCH 16/24] new workflow: accessibility-tests-comparison --- .../accessibility-tests-comparison.yml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/accessibility-tests-comparison.yml diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml new file mode 100644 index 000000000000..0ec4f8b4b5ef --- /dev/null +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -0,0 +1,69 @@ +name: Accessibility Tests Comparison + +on: + issue_comment: + +jobs: + print-info: + if: github.event.issue.pull_request + needs: pr_sha_from_number + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - run: echo "outputs.sha ${{ needs.pr_sha_from_number.outputs.sha }}" + + pr_sha_from_number: + if: github.event.issue.pull_request + runs-on: ubuntu-latest + outputs: + head_sha: ${{ fromJSON(steps.get_pr.outputs.data).head.sha }} + base_sha: ${{ fromJSON(steps.get_pr.outputs.date).base.sha }} + steps: + - id: get_pr + name: GitHub API Request + uses: octokit/request-action@v2.1.7 + with: + route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + accessibility-tests-comparison: + name: Compare accessibility tests + if: github.event.issue.pull_request && github.event.comment.body == 'please compare accessibility tests' + runs-on: ubuntu-latest + needs: pr_sha_from_number + steps: + - name: Write Intro to Job summary + - run: | + echo "Hi, it looks like you requested a comparison of" >> $GITHUB_STEPS_SUMMARY + echo "accessibility tests for PR #${{ github.event.issue.number }}." >> $GITHUB_STEPS_SUMMARY + echo "The tests will first be run against the base branch of the PR." >> $GITHUB_STEPS_SUMMARY + echo "Then they will be run against the head commit of the PR." >> $GITHUB_STEPS_SUMMARY + echo "This should allow you to see that this PR fixes an accessibility" >> $GITHUB_STEPS_SUMMARY + echo "that has a corresponding regression test." >> $GITHUB_STEPS_SUMMARY + echo "" >> $GITHUB_STEPS_SUMMARY + echo "-----------" >> $GITHUB_STEPS_SUMMARY + echo "The following test results are against the base, whose commit SHA is:" >> $GITHUB_STEPS_SUMMARY + echo "${{ needs.pr_sha_from_number.outputs.base_sha }}" + echo "-----------" >> $GITHUB_STEPS_SUMMARY + + - name: Run accessibility tests against base branch + uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + with: + repository: ${{ github.repository }} + ref: ${{ needs.pr_sha_from_number.base_sha }} + + - name: Intro second run + run: | + echo "-----------" >> $GITHUB_STEPS_SUMMARY + echo "The following test results are against this PR, whose head commit SHA is:" >> $GITHUB_STEPS_SUMMARY + echo "${{ needs.pr_sha_from_number.outputs.head_sha }}" + echo "-----------" >> $GITHUB_STEPS_SUMMARY + + - name: Run accessibility tests against base branch + uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + with: + repository: ${{ github.repository }} + ref: ${{ needs.pr_sha_from_number.head_sha }} From 28f61c649cb7e738fade54963fc1e8681c014534 Mon Sep 17 00:00:00 2001 From: foo Date: Wed, 19 Oct 2022 20:54:38 -0500 Subject: [PATCH 17/24] fix new workflow --- .github/workflows/accessibility-tests-comparison.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 0ec4f8b4b5ef..3f8c0e5c99da 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -36,7 +36,7 @@ jobs: needs: pr_sha_from_number steps: - name: Write Intro to Job summary - - run: | + run: | echo "Hi, it looks like you requested a comparison of" >> $GITHUB_STEPS_SUMMARY echo "accessibility tests for PR #${{ github.event.issue.number }}." >> $GITHUB_STEPS_SUMMARY echo "The tests will first be run against the base branch of the PR." >> $GITHUB_STEPS_SUMMARY From 20c2ce864caf20c4bd9b80860844bf99ae55ccf5 Mon Sep 17 00:00:00 2001 From: foo Date: Wed, 19 Oct 2022 20:57:06 -0500 Subject: [PATCH 18/24] fix typo in new workflow --- .github/workflows/accessibility-tests-comparison.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 3f8c0e5c99da..8df538f17f72 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest outputs: head_sha: ${{ fromJSON(steps.get_pr.outputs.data).head.sha }} - base_sha: ${{ fromJSON(steps.get_pr.outputs.date).base.sha }} + base_sha: ${{ fromJSON(steps.get_pr.outputs.data).base.sha }} steps: - id: get_pr name: GitHub API Request From 764cf4ef11da9ad951c0099add6e6c16d2f9763b Mon Sep 17 00:00:00 2001 From: foo Date: Wed, 19 Oct 2022 21:00:11 -0500 Subject: [PATCH 19/24] GITHUB_STEP_SUMMARY (step singular) --- .../accessibility-tests-comparison.yml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 8df538f17f72..1f0b8c799ae3 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -37,17 +37,17 @@ jobs: steps: - name: Write Intro to Job summary run: | - echo "Hi, it looks like you requested a comparison of" >> $GITHUB_STEPS_SUMMARY - echo "accessibility tests for PR #${{ github.event.issue.number }}." >> $GITHUB_STEPS_SUMMARY - echo "The tests will first be run against the base branch of the PR." >> $GITHUB_STEPS_SUMMARY - echo "Then they will be run against the head commit of the PR." >> $GITHUB_STEPS_SUMMARY - echo "This should allow you to see that this PR fixes an accessibility" >> $GITHUB_STEPS_SUMMARY - echo "that has a corresponding regression test." >> $GITHUB_STEPS_SUMMARY - echo "" >> $GITHUB_STEPS_SUMMARY - echo "-----------" >> $GITHUB_STEPS_SUMMARY - echo "The following test results are against the base, whose commit SHA is:" >> $GITHUB_STEPS_SUMMARY + echo "Hi, it looks like you requested a comparison of" >> $GITHUB_STEP_SUMMARY + echo "accessibility tests for PR #${{ github.event.issue.number }}." >> $GITHUB_STEP_SUMMARY + echo "The tests will first be run against the base branch of the PR." >> $GITHUB_STEP_SUMMARY + echo "Then they will be run against the head commit of the PR." >> $GITHUB_STEP_SUMMARY + echo "This should allow you to see that this PR fixes an accessibility" >> $GITHUB_STEP_SUMMARY + echo "that has a corresponding regression test." >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "The following test results are against the base, whose commit SHA is:" >> $GITHUB_STEP_SUMMARY echo "${{ needs.pr_sha_from_number.outputs.base_sha }}" - echo "-----------" >> $GITHUB_STEPS_SUMMARY + echo "-----------" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main @@ -57,10 +57,10 @@ jobs: - name: Intro second run run: | - echo "-----------" >> $GITHUB_STEPS_SUMMARY - echo "The following test results are against this PR, whose head commit SHA is:" >> $GITHUB_STEPS_SUMMARY + echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "The following test results are against this PR, whose head commit SHA is:" >> $GITHUB_STEP_SUMMARY echo "${{ needs.pr_sha_from_number.outputs.head_sha }}" - echo "-----------" >> $GITHUB_STEPS_SUMMARY + echo "-----------" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main From 1cbbd0b2411f5e79645492e322251bcd4ec9785a Mon Sep 17 00:00:00 2001 From: foo Date: Wed, 19 Oct 2022 22:33:10 -0500 Subject: [PATCH 20/24] fixes to workflow --- .../accessibility-tests-comparison.yml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 1f0b8c799ae3..11c997d5733a 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -12,7 +12,8 @@ jobs: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - run: echo "outputs.sha ${{ needs.pr_sha_from_number.outputs.sha }}" + - run: echo "outputs.head_sha ${{ needs.pr_sha_from_number.outputs.head_sha }}" + - run: echo "outputs.head_sha ${{ needs.pr_sha_from_number.outputs.base_sha }}" pr_sha_from_number: if: github.event.issue.pull_request @@ -42,28 +43,31 @@ jobs: echo "The tests will first be run against the base branch of the PR." >> $GITHUB_STEP_SUMMARY echo "Then they will be run against the head commit of the PR." >> $GITHUB_STEP_SUMMARY echo "This should allow you to see that this PR fixes an accessibility" >> $GITHUB_STEP_SUMMARY - echo "that has a corresponding regression test." >> $GITHUB_STEP_SUMMARY + echo "issue that has a corresponding regression test." >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY echo "The following test results are against the base, whose commit SHA is:" >> $GITHUB_STEP_SUMMARY - echo "${{ needs.pr_sha_from_number.outputs.base_sha }}" - echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "${{ needs.pr_sha_from_number.outputs.base_sha }}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main with: repository: ${{ github.repository }} - ref: ${{ needs.pr_sha_from_number.base_sha }} + ref: ${{ needs.pr_sha_from_number.outputs.base_sha }} - name: Intro second run run: | + echo "" >> $GITHUB_STEP_SUMMARY echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY echo "The following test results are against this PR, whose head commit SHA is:" >> $GITHUB_STEP_SUMMARY - echo "${{ needs.pr_sha_from_number.outputs.head_sha }}" - echo "-----------" >> $GITHUB_STEP_SUMMARY + echo "${{ needs.pr_sha_from_number.outputs.head_sha }}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main with: repository: ${{ github.repository }} - ref: ${{ needs.pr_sha_from_number.head_sha }} + ref: ${{ needs.pr_sha_from_number.outputs.head_sha }} From bfb6a7993a75cb09ae80ca8a0da3de15f75f004a Mon Sep 17 00:00:00 2001 From: gabalafou Date: Mon, 7 Nov 2022 07:34:27 -0600 Subject: [PATCH 21/24] accessibility-test-jupyterlab --- .github/workflows/accessibility-tests-comparison.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 11c997d5733a..113c82bda390 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -52,7 +52,7 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch - uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + uses: gabalafou/jupyter-a11y-testing/.github/actions/accessibility-test-jupyterlab@main with: repository: ${{ github.repository }} ref: ${{ needs.pr_sha_from_number.outputs.base_sha }} @@ -67,7 +67,7 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY - name: Run accessibility tests against base branch - uses: gabalafou/jupyter-a11y-testing/.github/actions/jlab-a11y-test@main + uses: gabalafou/jupyter-a11y-testing/.github/actions/accessibility-test-jupyterlab@main with: repository: ${{ github.repository }} ref: ${{ needs.pr_sha_from_number.outputs.head_sha }} From 105c596b1608244455d5d4277ca1696f380f33c6 Mon Sep 17 00:00:00 2001 From: gabalafou Date: Mon, 7 Nov 2022 07:37:11 -0600 Subject: [PATCH 22/24] test_project: regression --- .github/workflows/accessibility-tests-comparison.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/accessibility-tests-comparison.yml b/.github/workflows/accessibility-tests-comparison.yml index 113c82bda390..67c34f2c1891 100644 --- a/.github/workflows/accessibility-tests-comparison.yml +++ b/.github/workflows/accessibility-tests-comparison.yml @@ -56,6 +56,7 @@ jobs: with: repository: ${{ github.repository }} ref: ${{ needs.pr_sha_from_number.outputs.base_sha }} + test_project: regression - name: Intro second run run: | @@ -71,3 +72,4 @@ jobs: with: repository: ${{ github.repository }} ref: ${{ needs.pr_sha_from_number.outputs.head_sha }} + test_project: regression From 3f928f309e5af4a5f9d240fa35614381263d741f Mon Sep 17 00:00:00 2001 From: "codesee-maps[bot]" <86324825+codesee-maps[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 14:37:30 +0000 Subject: [PATCH 23/24] Install the CodeSee workflow. Learn more at https://docs.codesee.io --- .github/workflows/codesee-arch-diagram.yml | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/codesee-arch-diagram.yml diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml new file mode 100644 index 000000000000..ef979e93d8fb --- /dev/null +++ b/.github/workflows/codesee-arch-diagram.yml @@ -0,0 +1,90 @@ +# This workflow was added by CodeSee. Learn more at https://codesee.io/ +on: + push: + branches: + - master + pull_request_target: + types: [opened, synchronize, reopened] + +name: CodeSee Map + +permissions: read-all + +jobs: + test_map_action: + runs-on: ubuntu-latest + continue-on-error: true + name: Run CodeSee Map Analysis + steps: + - name: checkout + id: checkout + uses: actions/checkout@v2 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + + # codesee-detect-languages has an output with id languages. + - name: Detect Languages + id: detect-languages + uses: Codesee-io/codesee-detect-languages-action@latest + + - name: Configure JDK 16 + uses: actions/setup-java@v3 + if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }} + with: + java-version: '16' + distribution: 'zulu' + + # CodeSee Maps Go support uses a static binary so there's no setup step required. + + - name: Configure Node.js 14 + uses: actions/setup-node@v3 + if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }} + with: + node-version: '14' + + - name: Configure Python 3.x + uses: actions/setup-python@v2 + if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }} + with: + python-version: '3.10' + architecture: 'x64' + + - name: Configure Ruby '3.x' + uses: ruby/setup-ruby@v1 + if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }} + with: + ruby-version: '3.0' + + # We need the rust toolchain because it uses rustc and cargo to inspect the package + - name: Configure Rust 1.x stable + uses: actions-rs/toolchain@v1 + if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }} + with: + toolchain: stable + + - name: Generate Map + id: generate-map + uses: Codesee-io/codesee-map-action@latest + with: + step: map + api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + github_ref: ${{ github.ref }} + languages: ${{ steps.detect-languages.outputs.languages }} + + - name: Upload Map + id: upload-map + uses: Codesee-io/codesee-map-action@latest + with: + step: mapUpload + api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + github_ref: ${{ github.ref }} + + - name: Insights + id: insights + uses: Codesee-io/codesee-map-action@latest + with: + step: insights + api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} + github_ref: ${{ github.ref }} From 3ec785281875a93b7e209460cdbf91a6698f8b17 Mon Sep 17 00:00:00 2001 From: "codesee-maps[bot]" <86324825+codesee-maps[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 18:51:59 +0000 Subject: [PATCH 24/24] Install the CodeSee workflow. Learn more at https://docs.codesee.io --- .github/workflows/codesee-arch-diagram.yml | 80 ++-------------------- 1 file changed, 6 insertions(+), 74 deletions(-) diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml index ef979e93d8fb..a2fbc75ea462 100644 --- a/.github/workflows/codesee-arch-diagram.yml +++ b/.github/workflows/codesee-arch-diagram.yml @@ -1,4 +1,5 @@ # This workflow was added by CodeSee. Learn more at https://codesee.io/ +# This is v2.0 of this workflow file on: push: branches: @@ -6,85 +7,16 @@ on: pull_request_target: types: [opened, synchronize, reopened] -name: CodeSee Map +name: CodeSee permissions: read-all jobs: - test_map_action: + codesee: runs-on: ubuntu-latest continue-on-error: true - name: Run CodeSee Map Analysis + name: Analyze the repo with CodeSee steps: - - name: checkout - id: checkout - uses: actions/checkout@v2 + - uses: Codesee-io/codesee-action@v2 with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 0 - - # codesee-detect-languages has an output with id languages. - - name: Detect Languages - id: detect-languages - uses: Codesee-io/codesee-detect-languages-action@latest - - - name: Configure JDK 16 - uses: actions/setup-java@v3 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }} - with: - java-version: '16' - distribution: 'zulu' - - # CodeSee Maps Go support uses a static binary so there's no setup step required. - - - name: Configure Node.js 14 - uses: actions/setup-node@v3 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }} - with: - node-version: '14' - - - name: Configure Python 3.x - uses: actions/setup-python@v2 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }} - with: - python-version: '3.10' - architecture: 'x64' - - - name: Configure Ruby '3.x' - uses: ruby/setup-ruby@v1 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }} - with: - ruby-version: '3.0' - - # We need the rust toolchain because it uses rustc and cargo to inspect the package - - name: Configure Rust 1.x stable - uses: actions-rs/toolchain@v1 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }} - with: - toolchain: stable - - - name: Generate Map - id: generate-map - uses: Codesee-io/codesee-map-action@latest - with: - step: map - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} - languages: ${{ steps.detect-languages.outputs.languages }} - - - name: Upload Map - id: upload-map - uses: Codesee-io/codesee-map-action@latest - with: - step: mapUpload - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} - - - name: Insights - id: insights - uses: Codesee-io/codesee-map-action@latest - with: - step: insights - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} + codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}