Skip to content

APG Infrastructure

Valerie Young edited this page Oct 22, 2020 · 15 revisions

This page is an overview of the infrastructure used to maintain the health of this repository. If you are a new contributor, you mostly need to know the following:

  1. We have a JavaScript, CSS and HTML linters and a spellcheck that we use to gain consistence in coding style across the repository. These linters are run in multiple places:

    1. Continuous Integration These linters are run as part of our continuous integration in a github action.
    2. Local Development These linters can be run locally as you work with the following commands (see package.json if these change):
      1. npm run lint # Runs all linters
      2. npm run lint:css # Runs the CSS linter
      3. npm run lint:js # Runs the JS linter
      4. npm run lint:html # Runs the HTML linter
      5. npm run lint:spelling # Runs spell check
      6. `npm run lint:fix # Runs JS and CSS linter to fix any automatically fixable mistakes
    3. Commit hooks The CSS and JS linters are also run with "--fix" as part of a "pre-commit" hook. The fix flag will fix anything that can be automatically fixed. The fixes will be automatically fixed and the changes added to your commit, so you might see different spacing or formatting in your commit than you added.
  2. We have regression tests for the example widgets on the "example" pages. These regression tests only when you make a change to a file in the examples/ or tests/ directory. They are run the following places:

    1. Continuous Integration These regression tests are run as part of the continuous integration in a github action. Note: there is an occasional failure in the regression tests from "webdriver". If you see a "webdriver" related error, the tests should just be re-triggered by an admin.
    2. Local development You can run the regression tests locally with the following command:
      1. npm run regression
  3. We have a PR previewer that will run when you are editing the specification page OR and example page. The PR previewer will host your PR and add a link that looks like "Preview | Diff" to your PR's description. You can edit this link to point to the part of the aria practices document that you edited in your PR.

TODO: Add links to the appropriate sections ^

Commit hooks

TODO: Outline the use of git hooks

Github Apps

Dependabot

The dependabot app is enable on this repository to update npm dependencies.

Travis

Travis is used for continuous testing on this repository. Travis jobs are configured in .travis.yaml.

TO DO: We are moving from Travis to using github checks.

Preview Bot

Preview bot will produce a link to the new specification and a diff between the new and old specification on PRs that edit the spec. It then edits the PR description to add these links.

NPM Modules

ava

AVA is a testing framework used to run regression tests of the example widgets in the examples/ directory, read more about our testing framework here.

cheerio

Cheerio is used to parse html by the regression report and the script that creates the examples/index.js file.

cspell

cspell is a spell checker which runs during npm run lint.

eslint

ESLint is a javascript linter which runs during npm run lint.

geckodriver

Geckodriver is used to control firefox for the regression tests of the widgets in the examples/ directory, read more about our testing framework here.

glob

glob is used in the script that creates the examples/index.js file.

husky

TO DO: What is this for?

lint-staged

TO DO: What is this for?

run-node

This is used by merge-driver.

selenium-webdriver

Selenium Webdriver is our browser testing framework, read more about the framework here.

stylelint

CSS linter which runs during npm run lint.

stylelint-config-standard

CSS linter which runs during npm run lint.

vnu-jar

HTML linter which runs during npm run lint.

This utility will help us when Greenkeeper (see section on Github apps) has updated a dependency in package.json and creates a merge conflict in the auto-generated package-lock.json npm file. The merge conflict is automatically fixed by this utility.

Clone this wiki locally