Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A simple GitHub Actions workflow to build and test a Node.js application.
# .github/workflows/demo.yml
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm testGitHub Actions is a CI/CD and automation platform integrated with GitHub that allows developers to automate workflows for building, testing, and deploying code directly from their repositories using YAML configuration files.
Origin & Creator
Developed by GitHub to provide integrated CI/CD and automation within GitHub repositories, eliminating the need for external CI/CD services.
Industrial Note
GitHub Actions is widely used in open-source projects, DevOps automation, continuous deployment to cloud providers, and integration with microservices architectures.