It's always possible that we forget to run the tests before pushing to GitHub. Luckily, continuous integration (CI) platforms can help us catch failing tests even when we do forget to run them.
In this exercise, you will use GitHub Actions to do exactly this.
Set up Github Actions to run our tests for every commit we push to our repository.
Get some initial familiarity with GitHub Actions by reading the quickstart guide
Work collaboratively!
Copy the code snippet below and paste it into .github/workflows/python-tests.yaml in your repository.
- Discuss with your group what you think each of the lines in `.github/workflows/python-tests.yml` does
- Add `.github/workflows/python-tests.yml` to the repository, commit it and push it to github. Link to this issue on that commit by including `Answers https://github.com/UCL-MPHY0021-21-22/RSE-Classwork/issues/19` in the commit message.
- Check whether the tests pass on your remote (_Hint_: check the Actions tab on your GitHub fork)
If you're done with this issue, try to add test coverage by working on this related issue: https://github.com/UCL-MPHY0021-21-22/RSE-Classwork/issues/20
## [Sample solution](https://github.com/alessandrofelder/times-tests/blob/check-ci-works/.github/workflows/pytest.yaml) and [sample solution in action](https://github.com/alessandrofelder/times-tests/actions/runs/1418054616).
Use CI to run the tests for you.
It's always possible that we forget to run the tests before pushing to GitHub. Luckily, continuous integration (CI) platforms can help us catch failing tests even when we do forget to run them. In this exercise, you will use GitHub Actions to do exactly this.
Set up Github Actions to run our tests for every commit we push to our repository.
.github/workflows/python-tests.yaml
in your repository.on: [push]
jobs: build: