Test Across Versions with a Matrix
/home/student/repos/webapp/.github/workflows/test.yml has three copy-pasted jobs that test on Node 18, 20 and 22, all on Linux. The library now also supports Windows, except on Node 18.
Replace the three jobs with one job named test that uses a matrix:
node: 18, 20, 22os: ubuntu-latest, windows-latestwindows-latest + 18 combination (5 jobs in total)matrix.os, and actions/setup-node gets node-version from matrix.nodenpm ci, npm testAbout this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.