Build a CI/CD Pipeline with GitHub Actions

Automate code testing on every push using a GitHub Actions CI pipeline.

Introduction

30 Second Summary

Imagine pushing your code to a team project, only to find out hours later that your changes broke something. In professional software teams, automated pipelines catch these bugs the moment code is pushed.

In this project, you will build a working CI/CD pipeline using GitHub Actions that automatically tests your code every time you push it to GitHub.

What You'll Build

A Node.js calculator application with automated unit tests, connected to a GitHub Actions CI pipeline that runs your tests on every push.

By the end of this project, you'll have:

  • A Node.js calculator module with four arithmetic functions and error handling.
  • Automated unit tests that verify your code works correctly using the Node.js built-in test runner.
  • A GitHub Actions workflow that automatically runs your tests every time you push code, and catches bugs with a red X when something breaks.
  • Secret Mission: Add a matrix strategy to test your code across multiple Node.js versions simultaneously.

Are there any prerequisites?

None. This project includes setup instructions for every tool you need. You will install and configure everything from scratch in Step 1.

Set Up Your Tools

To build a CI/CD pipeline, you need a few tools working together on your machine. Node.js lets you run JavaScript and manage packages. Git tracks your code changes. VS Code gives you a code editor to write everything in.

In this step, you will verify that Node.js is installed, create your project folder, and set up the folder structure your pipeline needs.

In this step, get ready to:
  • Verify Node.js is installed (version 20 or higher).
  • Create and initialize the project folder with Git and npm.
  • Set up the folder structure in VS Code.
Check if Node.js is installed

Node.js is the JavaScript runtime that powers your calculator app and its test runner. You need version 20 or higher because that is when Node.js stabilized its built-in test runner.

  • Press the Windows key to open your search bar.
  • Type Git Bash and press Enter to open it.
  • Check your Node.js version by running this command:
node --version

✔️ I see version 20 or higher

Nice, Node.js is ready to go. You should see something like v24.16.0 or any version starting with v20, v22, or v24.

  • Confirm npm is also available by running:
npm --version

You should see a version number printed. You are all set to continue.

ⓧ I see a version lower than 20

Your installed version is too old for this project. You need to upgrade to get the built-in test runner.

  • Go to https://nodejs.org/en/download in your browser.
  • Select the Windows 64-bit .msi installer and download it.
  • Run the installer and accept the default options. This will replace your older version.
  • Close Git Bash completely and reopen it (the old terminal session still references the old version).
  • Verify the upgrade by running:
node --version
npm --version

You should now see v24 (or whichever LTS the installer downloaded) and an npm version number.

ⓧ Command not found

Node.js is not installed on your machine yet.

  • Go to https://nodejs.org/en/download in your browser.
  • Select the Windows 64-bit .msi installer and download it.
  • Run the installer and accept all the default options.
  • Close Git Bash completely and reopen it (new programs are only recognized in fresh terminal sessions).
  • Verify the installation by running:
node --version
npm --version

You should see a version number for each (e.g. v24.16.0 and 10.x.x). If you still see "command not found", the installer may not have added Node.js to your PATH. Restart your computer and try again.

Create and initialize the project folder

Every project needs a home folder. You will create one on your Desktop so it is easy to find, then initialize it with Git and npm.

  • Move to your Desktop by running this command:
cd ~/Desktop
  • Create your project folder and initialize it by running these commands:
mkdir my-first-pipeline
cd my-first-pipeline
git init
npm init -y

What do these commands do?

  • mkdir my-first-pipeline creates a new folder called my-first-pipeline.
  • cd my-first-pipeline moves you inside that folder.
  • git init turns the folder into a Git repository so you can track changes.
  • npm init -y creates a package.json file with default settings. This file is how Node.js tracks your project's name, version, and scripts.
  • Confirm the folder was initialized by running:
ls

You should see package.json in the output. You should also see output from git init above that says "Initialized empty Git repository".

Not seeing package.json?

  • Make sure you ran cd my-first-pipeline before npm init -y. If you ran npm init -y in the wrong folder, delete it and start over from cd ~/Desktop.
  • If you see "npm: command not found", revisit the Node.js installation step above and make sure you reopened Git Bash after installing.

Need help debugging? Why is npm not recognized in my Git Bash terminal?

Open the project in VS Code and create the folder structure

Your pipeline needs a specific folder layout. The .github/workflows folder is where GitHub Actions looks for pipeline definitions.

  • Open the project in VS Code by running:
code .

What does this command do?

The code . command tells VS Code to open the current folder as a workspace. The dot (.) means "this folder I am in right now."

  • Back in Git Bash, create the three folders your project needs by running these commands:
mkdir src
mkdir tests
mkdir .github
mkdir .github/workflows

Why these folders?

  • src/ holds your application code (the calculator you will build next).
  • tests/ holds your automated test files.
  • .github/workflows/ is the exact path where GitHub Actions looks for workflow files. If this path is wrong, your pipeline will not run.
  • Confirm the folders exist by running:
ls -a

You should see src, tests, and .github in the output. The -a flag shows hidden folders (those starting with a dot).

  • Switch to VS Code. In the Explorer sidebar on the left, you should see all three folders listed under my-first-pipeline.

Don't see the folders in VS Code?

  • If the Explorer sidebar is not visible, press Ctrl+Shift+E to open it.
  • If the folders are missing, make sure you ran the mkdir commands while inside the my-first-pipeline folder. Run pwd in Git Bash to check your current location.
  • If VS Code opened the wrong folder, close it and run code . again from inside my-first-pipeline.

Still stuck? Help me figure out why my folders are not showing in VS Code.

✔️ Awesome, I've got everything!

Great. Make sure you have saved everything and your VS Code shows the src, tests, and .github folders in the sidebar.

ⓧ I'd like to double check the full code

Your package.json should look like this (auto-generated by npm init -y):

{
  "name": "my-first-pipeline",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

Your folder structure should look like this:

my-first-pipeline/
├── .github/
│   └── workflows/
├── src/
├── tests/
└── package.json

Your environment is ready. Next up, you will build the calculator app that your pipeline will test automatically.

Build the Calculator App

Your environment is set up and ready. Now comes the fun part: building the actual application your pipeline will protect.

Every CI/CD pipeline needs code to test. You'll create a calculator module with four math functions, then configure your project so the Node.js built-in test runner knows where to find your tests.

In this step, get ready to:
  • Create a calculator module with four math functions.
  • Configure package.json to use the Node.js built-in test runner.
Create the calculator module

Your pipeline will automatically run tests every time you push code. Those tests need something to test. The calculator module gives you four simple functions with clear expected outputs, perfect for verifying that your pipeline catches real bugs.

  • In VS Code, right-click the src folder in the Explorer sidebar.
  • Click New File.
  • Type calculator.js and press Enter.
  • Add the following code to calculator.js:
// Addition function
function add(a, b) {
  return a + b;
}

// Subtraction function
function subtract(a, b) {
  return a - b;
}

// Multiplication function
function multiply(a, b) {
  return a * b;
}

// Division function with zero-check
function divide(a, b) {
  if (b === 0) {
    throw new Error('Cannot divide by zero');
  }
  return a / b;
}

// Export all four functions as a module
module.exports = { add, subtract, multiply, divide };

What does this code do?

  • add, subtract, multiply, and divide are four standalone functions that each take two numbers and return a result.
  • The divide function includes a safety check. If someone tries to divide by zero, it throws an error instead of returning Infinity.
  • module.exports at the bottom bundles all four functions into a single package that other files can import using require().
  • Save calculator.js by pressing Ctrl+S (Windows) or Cmd+S (macOS).
  • Verify the module works by running this command in Git Bash:
node -e "const calc = require('./src/calculator'); console.log(calc.add(2,3))"
  • You should see 5 printed in the terminal.

Not seeing 5?

  • Make sure you saved calculator.js before running the command.
  • Check that the file is inside the src folder, not the project root. The command looks for ./src/calculator.
  • If you see a SyntaxError, double-check that every function has matching opening and closing curly braces.

Why isn't my calculator module loading in Node.js?

✔️ Awesome, I've got everything!

Great. Make sure you've saved calculator.js before moving on.

ⓧ I'd like to double check the full code

function add(a, b) {
  return a + b;
}

function subtract(a, b) {
  return a - b;
}

function multiply(a, b) {
  return a * b;
}

function divide(a, b) {
  if (b === 0) {
    throw new Error('Cannot divide by zero');
  }
  return a / b;
}

module.exports = { add, subtract, multiply, divide };
Update your package configuration

Your package.json currently has a placeholder test script that just prints an error. You need to point it at the Node.js built-in test runner so that npm test actually runs your tests.

  • Click package.json in the Explorer sidebar to open it.
  • Select all the existing content and replace it with the following:
{
  "name": "my-first-pipeline",
  "version": "1.0.0",
  "description": "A simple calculator app with CI/CD pipeline",
  "main": "src/calculator.js",
  "scripts": {
    "test": "node --test tests/"
  },
  "keywords": [],
  "author": "",
  "license": "MIT"
}

What changed?

  • "test": "node --test tests/" tells npm to use the Node.js built-in test runner and look for test files in the tests/ folder.
  • "main": "src/calculator.js" points to your calculator module as the project's entry point.
  • "description" and "license" are updated to describe your project accurately.
  • Save package.json.

Seeing a JSON syntax error later?

  • JSON files are strict about syntax. Make sure every string has double quotes, every key has a colon after it, and commas separate items with no trailing comma after the last item.
  • If you copied the code above exactly, you should be fine. VS Code will underline syntax errors in red if something is off.

Why is my package.json causing errors?

✔️ Awesome, I've got everything!

Make sure you've saved package.json before continuing.

ⓧ I'd like to double check the full code

{
  "name": "my-first-pipeline",
  "version": "1.0.0",
  "description": "A simple calculator app with CI/CD pipeline",
  "main": "src/calculator.js",
  "scripts": {
    "test": "node --test tests/"
  },
  "keywords": [],
  "author": "",
  "license": "MIT"
}

Your calculator module is ready and verified. Next up, you'll write automated tests that prove each function works correctly.

Write Automated Tests

Your calculator module has four working functions. Before connecting it to a CI pipeline, you need a way to automatically verify that those functions produce the correct results.

Automated tests are small programs that call your functions and check the output against expected values. In this step, you'll write five tests using Node.js's built-in test runner.

In this step, get ready to:
  • Write five automated test cases for the calculator functions.
  • Run the tests locally and confirm they all pass.
Create the test file and import dependencies

Node.js ships with a built-in test runner, so you don't need to install any extra libraries. You just need to import the right modules.

  • In VS Code, right-click the tests folder in the Explorer sidebar.
  • Click New File and name it calculator.test.js.
  • Add the following imports at the top of the file:
const { test } = require('node:test');
const assert = require('node:assert');
const { add, subtract, multiply, divide } = require('../src/calculator');

What do these imports do?

  • node:test gives you the test function to define individual test cases.
  • node:assert gives you assertion methods like strictEqual and throws to check if values match expectations.
  • The third line imports the four calculator functions you built in the previous step so you can test them.

You won't see a change yet. The next chunk adds the test cases that use these imports.

Write five test cases

Each test case calls one of your calculator functions with known inputs and checks that the output matches the expected result. You'll test all four operations, plus one edge case for dividing by zero.

  • Below the imports in tests/calculator.test.js, add these five test cases:
test('add returns sum of two numbers', () => {
  assert.strictEqual(add(2, 3), 5);
  assert.strictEqual(add(-1, 1), 0);
});

test('subtract returns difference of two numbers', () => {
  assert.strictEqual(subtract(5, 3), 2);
  assert.strictEqual(subtract(0, 5), -5);
});

test('multiply returns product of two numbers', () => {
  assert.strictEqual(multiply(3, 4), 12);
  assert.strictEqual(multiply(0, 5), 0);
});

test('divide returns quotient of two numbers', () => {
  assert.strictEqual(divide(10, 2), 5);
  assert.strictEqual(divide(9, 3), 3);
});

test('divide throws error when dividing by zero', () => {
  assert.throws(() => divide(10, 0), { message: 'Cannot divide by zero' });
});

What does this code do?

Each test() call defines one test case with a descriptive name and a function that runs the checks.

  • assert.strictEqual(actual, expected) checks that the function's return value exactly matches what you expect. If it doesn't, the test fails and tells you what went wrong.
  • assert.throws() checks that a function throws an error. You pass it a function that should throw, plus an object describing the expected error message.
  • Each test includes two assertions to verify the function works with different inputs, not just one lucky case.
  • Save tests/calculator.test.js.

Not sure your file looks right?

Make sure the imports are at the very top and the five test() calls come directly below them with no extra code between. Check that the file path in the third import is ../src/calculator (two dots, meaning "go up one folder").

Help me check my test file is set up correctly.

✔️ Awesome, I've got everything!

Great. Make sure you've saved the file before moving on.

ⓧ I'd like to double check the full code

const { test } = require('node:test');
const assert = require('node:assert');
const { add, subtract, multiply, divide } = require('../src/calculator');

test('add returns sum of two numbers', () => {
  assert.strictEqual(add(2, 3), 5);
  assert.strictEqual(add(-1, 1), 0);
});

test('subtract returns difference of two numbers', () => {
  assert.strictEqual(subtract(5, 3), 2);
  assert.strictEqual(subtract(0, 5), -5);
});

test('multiply returns product of two numbers', () => {
  assert.strictEqual(multiply(3, 4), 12);
  assert.strictEqual(multiply(0, 5), 0);
});

test('divide returns quotient of two numbers', () => {
  assert.strictEqual(divide(10, 2), 5);
  assert.strictEqual(divide(9, 3), 3);
});

test('divide throws error when dividing by zero', () => {
  assert.throws(() => divide(10, 0), { message: 'Cannot divide by zero' });
});
Run the tests locally

Before your CI pipeline can run these tests in the cloud, you need to confirm they pass on your own machine first.

  • Run your tests by entering this command in Git Bash:
npm test
  • You should see output listing all 5 tests with a pass status next to each one.

What should I see?

The Node.js test runner uses the spec reporter by default, which outputs results in a human-readable format. You'll see each test name listed with a pass indicator, and a summary at the bottom showing 5 tests passed.

Seeing test failures or errors?

  • If you see "Cannot find module", double check that the import path in your test file is ../src/calculator (with two dots). This goes up one level from the tests folder into src.
  • If a test fails with an "AssertionError", check that your src/calculator.js functions return the correct values. The add function should return a + b, not a - b.
  • If you see "node: bad option: --test", your Node.js version may be too old. Run node --version and confirm it shows v20 or higher.

Help me debug my failing tests.

Your tests are passing locally. Next up, you'll create the CI pipeline that runs these exact tests automatically in the cloud every time you push code.

Create the CI Pipeline

Your calculator has four functions and five automated tests that all pass locally. But right now, the only way those tests run is when you manually type npm test in your terminal.

A CI pipeline solves this by running your tests automatically every time you push code. In this step, you will create a GitHub Actions workflow file that tells GitHub exactly how to test your code in the cloud.

In this step, get ready to:
  • Create a CI workflow file that triggers on every push and pull request.
  • Define the steps GitHub Actions runs to test your code.
  • Generate a lockfile so the pipeline can reproduce your exact dependencies.
Create the CI workflow file

GitHub Actions looks for workflow definitions inside the .github/workflows/ folder. Each YAML file in that folder defines a separate pipeline.

  • In VS Code, right-click the .github/workflows folder in the Explorer sidebar and select New File.
  • Name the file ci.yml and press Enter.
  • Paste the following code into ci.yml:
name: CI Pipeline

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '24.x'
      - run: npm ci
      - run: npm test

What does this workflow do?

  • name: CI Pipeline gives the workflow a label that appears in the GitHub Actions tab.
  • on: defines the triggers. This pipeline runs whenever you push code or open a pull request targeting the main branch.
  • runs-on: ubuntu-latest tells GitHub to spin up a fresh Linux virtual machine for your job.
  • actions/checkout@v6 copies your repository code onto that virtual machine.
  • actions/setup-node@v4 installs Node.js 24.x so the machine can run your JavaScript.
  • npm ci installs your project dependencies from the lockfile. npm test runs your five calculator tests.
  • Save ci.yml by pressing Cmd+S (macOS) or Ctrl+S (Windows).
  • Confirm the file path in the VS Code Explorer sidebar reads .github/workflows/ci.yml.

File not showing in the right folder?

Make sure you right-clicked the workflows folder, not the .github folder or the project root. If the file ended up in the wrong spot, drag it into .github/workflows/ using the Explorer sidebar.

help me fix my ci.yml file location

Why npm ci instead of npm install?

In a CI environment, you want identical dependencies every time. npm ci installs exactly what the lockfile specifies, fails if anything is out of sync, and runs faster than npm install. This makes your pipeline reproducible and predictable.

Generate the lockfile

The npm ci command in your pipeline requires a package-lock.json file to exist in your repository. Without it, the pipeline will fail.

  • Generate the lockfile by running this command in Git Bash:
npm install
  • Confirm package-lock.json exists by running:
ls package-lock.json

You should see package-lock.json printed in the output.

Don't see package-lock.json?

Make sure your terminal is inside the my-first-pipeline folder. Run pwd to check your current directory. If you are somewhere else, run cd ~/Desktop/my-first-pipeline and try npm install again.

help me generate my package-lock.json file

✔️ Awesome, I've got everything!

Great. Double check you have saved ci.yml and confirm package-lock.json appears in your Explorer sidebar.

ⓧ I'd like to double check the full code

Here is the complete ci.yml file. Make sure yours matches exactly:

name: CI Pipeline

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '24.x'
      - run: npm ci
      - run: npm test

Your pipeline is ready and waiting. Next up, you will push everything to GitHub and watch this workflow run in the cloud for the first time.

Push and Watch Your Pipeline Run

Your calculator is tested, your pipeline is defined, and everything works locally. Now it is time to see CI in action.

In this step, you will push your code to GitHub and watch GitHub Actions pick it up automatically. You will also intentionally break a test to see how the pipeline catches bugs before they reach production.

In this step, get ready to:
  • Push your code to a public GitHub repository.
  • Watch the pipeline run and read its logs.
  • Break the pipeline on purpose, then fix it.
Create a GitHub repository and push your code

Your pipeline file tells GitHub Actions what to do, but it only runs when your code lives on GitHub. You need to create a remote repository and push everything up.

  • Open your browser and go to github.com.
  • In the upper-right corner of any page, click the + icon, then click New repository.
  • Type my-first-pipeline in the Repository name field.
  • Select Public for the repository visibility.
  • Leave all checkboxes unchecked. Do NOT add a README, .gitignore, or license.
  • Click Create repository.

Why skip the README?

You already have files locally. If GitHub creates a README on the remote, your local repo and the remote will have conflicting histories. Keeping the remote empty avoids merge conflicts on your first push.

GitHub shows you a page with setup instructions. You will use the commands for pushing an existing repository.

  • Switch back to Git Bash and connect your local repo to GitHub by running these commands:
git remote add origin https://github.com/[[GITHUB_USERNAME="your-github-username"]]/my-first-pipeline.git
git branch -M main
  • Stage all your files, commit them, and push to GitHub by running:
git add .
git commit -m "feat: add calculator with tests and CI pipeline"
git push -u origin main

What do these commands do?

  • git remote add origin links your local repo to the GitHub repository you just created.
  • git branch -M main renames your current branch to main (matching what GitHub expects).
  • git add . stages every file in your project for the commit.
  • git commit saves a snapshot of your project with a descriptive message.
  • git push -u origin main uploads everything to GitHub and sets main as the default remote branch.

Signing in to GitHub from Git Bash

When you push for the first time, a sign-in window will automatically open in your browser. Follow the prompts to authorize Git to access your GitHub account. After you sign in once, Git stores your credentials so you will not be prompted again.

  • After the push completes, refresh your GitHub repository page in the browser. You should see all your project files listed (src/, tests/, .github/workflows/, package.json, package-lock.json).

Push failed or files not showing up?

  • If you see an error about the remote already existing, you may have run git remote add origin twice. Run git remote -v to check your remote URL.
  • If authentication fails, make sure you completed the sign-in flow in your browser. Close Git Bash, reopen it, and try the push command again.
  • If your files are missing on GitHub, make sure you ran git add . before committing. The dot stages everything in the current folder.

Help me troubleshoot my git push to GitHub

Watch the pipeline run

The moment you pushed, GitHub detected your workflow file and started running your pipeline. Let's go watch it work.

  • On your GitHub repository page, click the Actions tab at the top of the page.
  • You should see a workflow run listed with your commit message (feat: add calculator with tests and CI pipeline). Click on it.
  • Click on the test job to expand its logs.
  • Read through the log steps. You will see GitHub checking out your code, setting up Node.js, installing dependencies with npm ci, and running your tests with npm test.

What is a runner?

GitHub Actions runs your pipeline on a virtual machine called a runner. The ubuntu-latest label in your workflow file tells GitHub to use a Linux machine with 4 CPUs and 16 GB of RAM.

Every time you push code, GitHub spins up a fresh runner, runs your steps, and tears it down. You never have to manage a server.

  • Confirm the workflow run shows a green checkmark. This means all 5 of your tests passed on GitHub's server.

Don't see the Actions tab or the run?

  • Make sure your repository is public. GitHub Actions is free and unlimited for public repositories.
  • Check that the file .github/workflows/ci.yml appears in your repo on GitHub. If it is missing, the .github folder may not have been staged. Run git add ., commit, and push again.

My GitHub Actions pipeline isn't showing up or running

Break the pipeline, then fix it

A green pipeline is great, but the real value of CI is catching bugs. Let's intentionally introduce a bug and watch the pipeline do its job.

  • In VS Code, open src/calculator.js.
  • Find this line inside the add function:
  return a + b;
  • Change the + to a -, so the line now looks like this:
  return a - b;
  • Save src/calculator.js.
  • Commit and push the broken code by running:
git add .
git commit -m "break: introduce a bug"
git push
  • Go back to the Actions tab on GitHub. You will see a new workflow run appear.
  • Wait for it to finish. It will show a red X, meaning the pipeline failed.
  • Click on the failed run, then click the test job to expand the logs.
  • Read the error output. You will see exactly which test failed and why. The add test expected 5 but got -1 (because 2 - 3 = -1).

Why break things on purpose?

In a real project, bugs slip in by accident. The pipeline catches them before broken code reaches your users. By breaking and fixing on purpose, you now understand exactly what happens when CI fails and how to read the error logs.

Now fix the bug and push one more time to confirm the pipeline recovers.

  • In VS Code, change the add function back so the return line reads:
  return a + b;
  • Save src/calculator.js.
  • Commit and push the fix by running:
git add .
git commit -m "fix: correct the add function"
git push
  • Return to the Actions tab on GitHub. Wait for the new run to complete.
  • You should now see three workflow runs: one green (initial), one red (bug), and one green (fix).

Pipeline still showing red after the fix?

  • Open src/calculator.js and confirm the add function returns a + b (not a - b).
  • Make sure you saved the file before committing. Unsaved changes are not picked up by git add.
  • Run npm test locally to verify all 5 tests pass before pushing.

My pipeline is still failing after I fixed the bug

Secret mission

Add a Matrix Strategy

Your pipeline currently tests on a single Node.js version. Real-world teams test across multiple versions simultaneously to catch compatibility issues early. In this mission, you'll add a matrix strategy so GitHub Actions runs your tests on Node.js 22.x and 24.x in parallel.

Clean Up Your Resources

Clean Up Your Resources

This project runs entirely locally and on GitHub's free tier, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.

Resources you used:

  • Local my-first-pipeline project folder on your Desktop.
  • Public GitHub repository my-first-pipeline with GitHub Actions workflows.
  • Node.js (if you installed it during this project).

Keep everything running

No action needed. Choose this if you are still actively building or plan to extend this project soon.

  • Your GitHub Actions pipeline only runs when you push code or open a pull request. It does not cost anything or consume resources while idle.
  • The local my-first-pipeline folder stays on your Desktop for future editing.
  • Node.js remains installed on your machine for other JavaScript projects.

Pause - I'll come back to this later

Shut down running processes to free up memory. Your files and repository stay intact for when you return.

  • Close VS Code.
  • Close Git Bash.
  • Your GitHub repository remains available at the same URL whenever you are ready to continue.

Delete - I don't want to use this again

Remove all project resources and start fresh. Follow each item below to fully clean up.

  • Delete the local project folder. In Git Bash, run:
  • Delete the GitHub repository:
  • Go to your my-first-pipeline repository on GitHub.
  • Click the Settings tab.
  • Scroll down to the Danger Zone section and click Delete this repository.
  • Click I want to delete this repository, then click I have read and understand these effects.
  • Type the repository name to confirm, then click Delete this repository.
  • Uninstall Node.js (optional, only if you installed it during this project):
  • On Windows, open Settings, select Apps, then Installed apps. Find Node.js in the list and click Uninstall.

Nice Work!

Nice Work!

You just built a fully automated CI/CD pipeline from scratch using GitHub Actions. Every time you push code, a cloud server spins up, installs your dependencies, and runs your tests automatically.

You've learned how to:

  • Build a Node.js calculator module with automated unit tests using the built-in test runner.
  • Create a GitHub Actions CI workflow that triggers on every push and pull request to your main branch.
  • Experience the full CI feedback loop by intentionally breaking a test, watching the pipeline catch the bug with a red X, then fixing it and watching it recover.
  • Secret Mission: Added a matrix strategy to test your code across multiple Node.js versions in parallel.

Ready to quiz yourself?