Skip to content

Upgrade CodeSee workflow to version 2 #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
317cdab
add accessibility-tests workflow
invalid-email-address Oct 13, 2022
f9495fb
pull_request_review -> issue_comment
invalid-email-address Oct 13, 2022
bdcb95c
comment.body
invalid-email-address Oct 13, 2022
b819d40
event.issue.pull_request
invalid-email-address Oct 13, 2022
6c8db57
update job print info
invalid-email-address Oct 13, 2022
033bc08
correct path to reusable workflow
invalid-email-address Oct 13, 2022
eebfb15
reusable workflow must have suffix and cannot be inside a step
invalid-email-address Oct 13, 2022
02fb61b
use action instead of workflow
invalid-email-address Oct 14, 2022
0b095f9
dump github to json
invalid-email-address Oct 14, 2022
1fc2d34
get sha from pr number
invalid-email-address Oct 14, 2022
5a4acbb
use fromJSON
invalid-email-address Oct 14, 2022
8cc9c0f
connect step output to job output
invalid-email-address Oct 15, 2022
91d514a
quote output
invalid-email-address Oct 15, 2022
f3bab13
dont know why the echo command fails, shrug
invalid-email-address Oct 15, 2022
011623f
grrr
invalid-email-address Oct 15, 2022
63a39af
new workflow: accessibility-tests-comparison
invalid-email-address Oct 20, 2022
28f61c6
fix new workflow
invalid-email-address Oct 20, 2022
20c2ce8
fix typo in new workflow
invalid-email-address Oct 20, 2022
764cf4e
GITHUB_STEP_SUMMARY (step singular)
invalid-email-address Oct 20, 2022
1cbbd0b
fixes to workflow
invalid-email-address Oct 20, 2022
bfb6a79
accessibility-test-jupyterlab
gabalafou Nov 7, 2022
105c596
test_project: regression
gabalafou Nov 7, 2022
3f928f3
Install the CodeSee workflow. Learn more at https://docs.codesee.io
Nov 11, 2022
3ec7852
Install the CodeSee workflow. Learn more at https://docs.codesee.io
Dec 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/accessibility-tests-comparison.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
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.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
runs-on: ubuntu-latest
outputs:
head_sha: ${{ fromJSON(steps.get_pr.outputs.data).head.sha }}
base_sha: ${{ fromJSON(steps.get_pr.outputs.data).base.sha }}
steps:
- id: get_pr
name: GitHub API Request
uses: octokit/[email protected]
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_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 "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 }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

- name: Run accessibility tests against base branch
uses: gabalafou/jupyter-a11y-testing/.github/actions/accessibility-test-jupyterlab@main
with:
repository: ${{ github.repository }}
ref: ${{ needs.pr_sha_from_number.outputs.base_sha }}
test_project: regression

- 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 }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

- name: Run accessibility tests against base branch
uses: gabalafou/jupyter-a11y-testing/.github/actions/accessibility-test-jupyterlab@main
with:
repository: ${{ github.repository }}
ref: ${{ needs.pr_sha_from_number.outputs.head_sha }}
test_project: regression
38 changes: 38 additions & 0 deletions .github/workflows/accessibility-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Accessibility Tests On Demand

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:
sha: ${{ fromJSON(steps.get_pr.outputs.data).head.sha }}
steps:
- id: get_pr
name: GitHub API Request
uses: octokit/[email protected]
with:
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: ${{ needs.pr_sha_from_number.outputs.sha }}
22 changes: 22 additions & 0 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow was added by CodeSee. Learn more at https://codesee.io/
# This is v2.0 of this workflow file
on:
push:
branches:
- master
pull_request_target:
types: [opened, synchronize, reopened]

name: CodeSee

permissions: read-all

jobs:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
name: Analyze the repo with CodeSee
steps:
- uses: Codesee-io/codesee-action@v2
with:
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}