This repository contains code for two projects:
packages/gh-action
contains a GitHub action, also released to tags in this repositorypackages/ado-extension
is an in-progress Azure DevOps extensionpackages/shared
contains most of the shared logic from the two projects; over time, product-specific code should move frompackages/shared
into the appropriate product folder
We use lerna
and yarn workspaces
to manage the monorepo. In most cases, running yarn scripts in the root directory should produce output from all packages.
To make a change, you can follow these steps:
- clone the repository. While our team typically uses forks, the action (and therefore our self-test workflow) doesn't support pull requests from forks yet (tracked here). For this reason, maintainers might consider working off branches of the main repository. To test a fork, you can consume your fork's branch from a different repository.
- run
yarn install
. You might encounterFound incompatible module
because one of our dependencies expects node versions^10.17.0 || ^12.3.0
. You can useyarn install --ignore-engines
to ignore this error. - make your code change
- run
yarn build
and/oryarn test
. If you're changingshared
, you may need to build it beforegh-action
picks up changes. - test your changes either
- locally: follow the instructions below this section
- remotely: push your changes to GitHub and consume your branch from a separate repository. Replace
uses: microsoft/accessibility-insights-action@v2
withuses: YourAccount/accessibility-insights-action@YourBranchOrSHA
- push your changes to GitHub
- create a pull request. If your branch is on the main repo, the PR build should run your implementation against the test files in
website-root
.
-
Install Windows Subsystem for Linux 2 (WSL 2)
To do this open the PowerShell tool as an Administrator and run commands below.
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2
-
Install Ubuntu 20.04 LTS
-
Install Windows Terminal
-
Install Docker Desktop
Open Windows Terminal from repository root folder and switch to Linux using command below.
wsl
From within Linux install applications below.
-
Install Homebrew. To do this run commands below.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
-
Install act using command below.
brew install act
- Install Docker Desktop
- Install act
Note: To run action on Windows use WSL 2.
- Build action using
yarn cbuild
oryarn build
command - Run action using
yarn act
Note: When run act first time choose large image option.
Note: When you get an error about composite actions is not supported then build act from source to use latest features.
Action is running inside a docker container. After action is completed the docker container is still running to preserve chrome setup and reduce subsequent action startup time.