Skip to content

Commit

Permalink
Add instructions for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SteMat89 committed Nov 7, 2024
1 parent ec5275a commit ba60079
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: Run Tests

on:

jobs:
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,23 @@ for you).

Just for clarification, an item can never have its `Quality` increase above `50`, however __"Sulfuras"__ is a
legendary item and as such its `Quality` is `80` and it never alters.

# Continuous Integration

Now that we've improved the codebase through a thorough refactor, and we've added some much-needed tests, it's time
to think about taking advantage of those.

We'd like to only be able to merge code if the test suite passes, otherwise the PR should fail. This way we're never adding
breaking changes. To do that, we're going to create a GitHub action to run the tests on Pull Request.

Start by looking in the [test.yml](.github/workflows/tests.yml) file.

1. Set the trigger to be when someone opens a PR against the `main` branch
2. Create a `test` job that runs on ubuntu
3. Firstly, we'd need to get the code - Hint: what are we doing when changing out a branch
4. Secondly, we'd need to make sure the environment is set - Hint: we're using Node
5. After we make sure we have the code and the environment set, we should install all dependencies and then run the tests.


Stretch goal: Sometimes we're too lazy to check the status each time. It might be easier to receive an email. What should
we do to make sure we're receiving an email whenever a build passes or fails?

0 comments on commit ba60079

Please sign in to comment.