Skip to content

KakshiDEV56/github-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitHub Actions CI Setup Guide

A simple guide to help you set up a GitHub Action for Continuous Integration (CI) in your project.


✨ What is GitHub Actions?

GitHub Actions lets you automate, customize, and execute your software development workflows right in your GitHub repository. It's commonly used for CI/CD pipelines.


πŸ“ Project Structure (Sample)

your-repo/
β”‚
β”œβ”€β”€ .github/
β”‚ └── workflows/
β”‚ └── ci.yml <-- Your GitHub Actions workflow file
β”‚
β”œβ”€β”€ src/
β”‚ └── your-code.js
β”œβ”€β”€ tests/
β”‚ └── your-tests.test.js
β”œβ”€β”€ package.json
└── README.md
  1. In your project root, create folders:
    mkdir -p .github/workflows
  2. touch .github/workflows/ci.yml add the following inside your ci.yml file
name: 🚨 Run Tests

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

jobs:
 test:
   runs-on: ubuntu-latest

   steps:
   - name: πŸ“₯ Checkout code
     uses: actions/checkout@v4

   - name: 🟒 Setup Node.js
     uses: actions/setup-node@v4
     with:
       node-version: '18'

   - name: πŸ“¦ Install dependencies
     run: npm ci

   - name: βœ… Run tests
     run: npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors