AndreyMork/dibox

View on GitHub
.github/workflows/ci-jobs.yaml

Summary

Maintainability
Test Coverage
name: CI Jobs

on:
  workflow_call:
    inputs:
      node-version:
        required: true
        type: number

jobs:
  format-check:
    name: Format check should pass
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup
        with:
          node-version: ${{ inputs.node-version }}
      - name: Format
        run: just format-check

  lint:
    name: Lint should pass
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup
        with:
          node-version: ${{ inputs.node-version }}
      - name: Lint
        run: just lint

  typecheck:
    name: Type Check should pass
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup
        with:
          node-version: ${{ inputs.node-version }}
      - name: Type Check
        run: just typecheck

  test:
    name: Tests should pass
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup
        with:
          node-version: ${{ inputs.node-version }}
      - name: Test
        run: just test

  build:
    name: Build should work
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./.github/actions/setup
        with:
          node-version: ${{ inputs.node-version }}
      - name: Prepack
        run: just prepack
      - name: Run esm
        run: node dist/Main.js
      - name: Run cjs
        run: node dist/Main.cjs