betagouv/service-national-universel

View on GitHub
.github/workflows/run-tests-lib.yml

Summary

Maintainability
Test Coverage
name: LIB - Run Tests

on:
  workflow_dispatch:
  workflow_call:
    inputs:
      branch_name:
        required: true
        type: string

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Git checkout
        uses: actions/checkout@v4
        with:
          ref: ${{ inputs.branch_name }}

      - name: Node 18.x
        uses: actions/setup-node@v2
        with:
          node-version: 18.x

      - name: Install packages
        run: npm ci

      - name: Build lib
        continue-on-error: false
        run: npm run build -w packages/lib

      - name: Lint lib code
        working-directory: packages/lib
        run: npm run lint

      - name: Test lib
        working-directory: packages/lib
        run: npm run test

      - name: Build ds
        continue-on-error: false
        run: npm run build -w packages/ds

      - name: Lint ds code
        working-directory: packages/ds
        run: npm run lint