Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.89 KB

3_actions.md

File metadata and controls

68 lines (43 loc) · 1.89 KB

Introduction to GitHub Actions

Continuous Integration

CI

In continuous integration practice, a centralized server regularly retrieves all new changes to the source code by developers and builds the software application from scratch.

The build and testing of the software is automated and every change or iteration to the software triggers an automated test run to ensure the desired delivery quality. The central repository is always kept updated in continuous integration practice.

Continuous Deployment

CICD

GitHub Actions

Actions

A template GitHub Action - Create React App

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

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

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x, 16.x, 18.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: |
        npm install

Important Links and References

GitHub Actions

GitHub Actions Help

Learn Docker

GitHub Actions Blog

Actions Checkout Repository

GitHub Marketplace