

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Running Tests
incomplete
2: Tests on CI
incomplete
3: Code Coverage
incomplete
4: README Badge for Tests
incomplete
This lesson's interactive features are locked, please to keep using them
Now that you've got some unit tests working locally, let's get them running on CI.
- name: Install dependencies
run: npm ci
Now that we need vitest to run our tests, we need the CI runner to install our dependencies. You're familiar with npm install, npm ci is very similar but stands for "clean-install", and is helpful in automated environments so we can be sure we get a clean install every time.
Very convenient that "ci" doesn't stand for anything else that might lead to confusion...
run: npm run test
You'd be surprised how many times companies I've worked at thought they had CI that was checking for failures, but broken code didn't actually fail the CI. It's important to make sure that your CI is checking for failures.
Paste the URL of your GitHub repo into the box and run the GitHub checks.