Workshop: Automate Testing on GitHub

Workshop subject

Style: guided

Overview

- Before starting this workshop, check you have the requisite tools and setup.

- By the end of this workshop, you will be able to:

  • Run project + tests locally
  • Add GitHub workflow to run unit and e2e tests

Exercises

  1. Configure a new workflow

    Select "Actions" from your repository tabs menu.

    In the "Continuous integration" section, click the "Configure" button for Node.js.

    For the demo project, we made two changes.

    We limited the node versions to one:

                    
                    matrix:
                      node-version: [22.x]
                    
                  

    And explicity set which tests should run:

                    
                      - run: npm run tests
                      - run: npm run tests:e2e:headless
                    
                  

Summary

How to…

Supporting materials

Further reading

Appendix