After taking a break from front-end development for a few months, I found an issue that needs to be solved. If you have read my other story about testing, you will know it is something I think about a lot in my work. Writing Web Components it is straightforward to create your tests that run before you deploy your code. I was asked how to write accessibility testing for your Jekyll website before you deploy your site. Luckily we can use GitHub Actions to execute your tests and pause the build if you fail.

GitHub Actions

What are GitHub Actions? From the GitHub site

GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want.

GitHub Actions is your CI/CD. Actions use YAML files to define the steps for your CI/CD pipeline. In our YAML file, we will define our pipeline. The steps we want to do are

  • Down load code
  • Change the permissions of our download code to 777
  • NPM install
  • Build a Jekyll website
  • Run our tests.
  • Continue with our CI/CD

I have created a GitHub repo to show how this will work. The steps in the YAML file blank.yml in the directory .github/workflows/blank.yml.

#accessibility #github #front-end-developer #testing #web-development

Testing Accessibility Before you Deploy with GitHub Actions.
2.20 GEEK