DeveloperBreeze

Github Ci Development Tutorials, Guides & Insights

Unlock 1+ expert-curated github ci tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your github ci skills on DeveloperBreeze.

Mastering GitHub Workflows for Continuous Integration and Deployment

Tutorial August 29, 2024

name: Node.js CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [12, 14, 16]

    steps:
    - uses: actions/checkout@v3
    - name: Set up Node.js
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
    - name: Install dependencies
      run: npm install
    - name: Run tests
      run: npm test
  • matrix: Allows you to define multiple configurations to test. In this example, the tests run on Node.js versions 12, 14, and 16.