

- #NPM INSTALL FROM GITHUB EXAMPLE SOFTWARE#
- #NPM INSTALL FROM GITHUB EXAMPLE CODE#
- #NPM INSTALL FROM GITHUB EXAMPLE SERIES#
This is what the final version of my workflow would look like: To make the execution of these tests cause an error in the execution we must add the option -exit to the axe command. Keep in mind that is an informative tool, and that it only executes accessibility tests and displays the results on the screen. In my next GitHub Action I want to run that CLI on every Pull Request. We will be able to access the details of the GitHub Action and see the results of the unit tests, to be able to solve the accessibility vulnerabilities in the code.Īxe is a family of tools created by Deque, which includes a command line interface (CLI), which runs the axe search engine for accessibility vulnerabilities, and that we can use from a terminal. After my Pull Request is created, my GitHub Action will start executing and the result will appear directly at the end of my Pull Request. Uses : actions/setup : node-version : 12.x On : push : branches : pull_request : branches : jobs : build : runs-on : ubuntu -latest You can change master to main if your main branch has that name. We can configure it to run immediately after each push to any of our branches (including the master branch).

The first thing is to define when we want the GitHub Action to run.
#NPM INSTALL FROM GITHUB EXAMPLE CODE#
You can see the code in the project repository in my Github profile. I have created a sample application in React with a small image component and some accessibility bugs. Since we have seen what GitHub Actions are, let’s see how we can use them to test the accessibility of your source code hosted on GitHub. Using GitHub Actions to automate accessibility tests The workflow configuration to define events, tasks, and steps to be executed in GitHub Actions are defined using YAML files that must be located in the. Github defines a workflow as a configurable automated process made up of one or more jobs.
#NPM INSTALL FROM GITHUB EXAMPLE SERIES#
With GitHub Actions you could execute a series of statements and commands after a specific event has occurred, simply put, it’s your own pipeline CI / CD directly in your repository.

#NPM INSTALL FROM GITHUB EXAMPLE SOFTWARE#
GitHub Actions allow you to automate, customize, and execute your software development workflows right in your repository with GitHub Actions. Puedes leer este artículo en español GitHub Actions But first, let’s define what GitHub Actions are and their workflows. Automating the accessibility tests of your source code with GitHub Actions #accessibility #development #react #GitHubĪutomating your accessibility tests with libraries like axe, pa11y, lighthouse, or unit tests directly in your GitHub repository is really easy with GitHub Actions.
