Skip to content
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

MAINT - Simplify repo and workflow #15

Merged
merged 19 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
53 changes: 0 additions & 53 deletions .github/workflows/a11y-test.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/jlab-a11y-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run accessibility tests on JupyterLab

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
jlab-a11y:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./testing/jupyterlab
shell: bash -l {0}
steps:
- name: Checkout repository 🛎
uses: actions/checkout@v3

- name: Cache conda 🧠
uses: actions/cache@v2
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}

- name: Install miniconda 🐍
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
environment-file: ./testing/jupyterlab/environment.yml
activate-environment: a11y-tests
use-only-tar-bz2: true

- name: Sanity checks on environment 🔍
run: |
conda info
conda env list
echo $CONDA_PREFIX

- name: Install node dependencies 🧶
run: |
conda run --prefix $CONDA_PREFIX npm install
conda run --prefix $CONDA_PREFIX npx playwright install chromium

- name: Run tests ✅
continue-on-error: true
run: |
conda run --prefix $CONDA_PREFIX npm test

- name: Get run refs 🏷
id: getrefs
run: |
export raw_branch=${GITHUB_REF#refs/heads/}
echo "::set-output name=branch::${raw_branch//\//-}"
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Upload testing results 📤
uses: actions/upload-artifact@v3
# using default retention policy = 90 days
with:
name: jupyterlab-a11y-${{ steps.getrefs.outputs.branch }}-${{ steps.getrefs.outputs.sha8 }}
path: |
testing/jupyterlab/test-results/
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ venv.bak/
# doit
.doit*

# yarn
.yarn-links/
# npm
node_modules/

# repos
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
init: |
cd testing/jupyterlab
echo " 📦 Installing node dependencies "
yarn install
npm install
npx playwright install
echo "🚀 Dependencies installed "
cd /workspace/accessibility/
Expand Down
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div align="center">
<img alt="Jupyter Accessibility logo" src="https://github.com/jupyter/accessibility/blob/main/docs/_static/logo.png?raw=true" width="250" />
</div>
<br>
![Jupyter accessibility - Colour logo](https://raw.githubusercontent.com/jupyter/accessibility/main/docs/_static/logos/JupAccessColor.svg#gh-light-mode-only)
![Jupyter accessibility - Light colour logo](https://raw.githubusercontent.com/jupyter/accessibility/main/docs/_static/logos/JupAccessLight.svg#gh-dark-mode-only)

# Jupyter accessibility testing tools

Expand All @@ -12,10 +10,29 @@ Information | Links
Project | [![OSI License badge - BSD-3](https://img.shields.io/badge/License-BSD%203--Clause%20📃-gray.svg?colorA=2D2A56&colorB=5936D9&style=flat.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Project backlog badge](https://img.shields.io/badge/Backlog-GitHub%20Board%20🗃️-gray.svg?colorA=2D2A56&colorB=A7B2F2&style=flat.svg)](https://github.com/orgs/Quansight-Labs/projects/8/views/1)
<!-- prettier-ignore-end -->

Welcome to the Jupyter Accessibility testing tools repository 👋🏽 .
Welcome to the Jupyter Accessibility testing tools' repository. 👋🏽
This repository is a place for accessibility testing within [Jupyter](https://jupyter.org).

To learn more about the broader accessibility initiatives within Jupyter, check the [jupyter/accessibility repository][jupyter-accesibility].

## 🧹 Pre-commit hooks
> **Note**
> 🗃 The JupyterLab tests and the corresponding instructions to run these can be found in [testing/jupyterlab](testing/jupyterlab).

## Plans for the future

Automated accessibility tests cannot address accessibility issues on their own, but used correctly they can be a useful tool.

Work in this repository is modeled after the [JupyterLab Benchmarks](https://github.com/jupyterlab/benchmarks/) repo.

As described in the [Jupyter Accessibility Roadmap](https://github.com/jupyter/accessibility/blob/main/docs/funding/czi-grant-roadmap.md),
the plan is to start by adding tests for JupyterLab.
We are starting with the web app UI, then we will add tests for the docs.
(The rationale to that sequence is to start with the harder problem first.)
trallard marked this conversation as resolved.
Show resolved Hide resolved

After JupyterLab, though it is not within scope of the grant driving the roadmap,
we hope to extend this testing to other parts of the Jupyter ecosystem beyond JupyterLab.

## Pre-commit hooks 🧹

This repository uses the `prettier` [pre-commit hook](https://pre-commit.com/) to standardize our YAML and markdown structure.

Expand Down Expand Up @@ -45,9 +62,9 @@ This repository uses the `prettier` [pre-commit hook](https://pre-commit.com/) t

Once installed, the pre-commit hooks will run automatically when you make a commit in version control.

## 📖 License
## License 📖

[This project is licensed under the BSD-3-Clause license](https://opensource.org/licenses/BSD-3-Clause).
Jupyter uses a shared copyright model that enables all contributors to maintain the copyright on their contributions. All code is licensed under the terms of the revised [BSD license](https://opensource.org/licenses/BSD-3-Clause).

<!-- links -->

Expand Down
Loading