What are GitHub Actions and how do they help in CI/CD?
GitHub Actions is GitHub’s built-in Continuous Integration/Continuous Deployment
(CI/CD) platform.
It lets you automate tasks — like running tests, building code, or deploying apps — every
time code is pushed or a PR is opened.
Example:
You can create a workflow file .github/workflows/test.yml:
name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
Whenever code is pushed, GitHub automatically runs your tests — ensuring quality before
merging.