メインコンテンツへスキップ
kitlocal.dev

CI/CDパイプライン生成

ローカルで実行

100% ブラウザ内で処理されます。入力や出力が端末の外に送信されることはありません。

GitHub ActionsとGitLab CIのパイプライン設定を生成します。

パイプライン実行ステップ
GitHub Actions ワークフロー YAML
name: Node.js Pipeline

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

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: ["18.x"]

    steps:
    - uses: actions/checkout@v4
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - name: Execute Clean Installation
      run: npm ci
    - name: Run Core Test Boundaries
      run: npm test
    - name: Compile Pipeline Release Target
      run: npm run build
設定をローカルの .github/workflows/main.yml に保存します