name: Main shareable workflow

on:
    workflow_call:

jobs:
    main:
        timeout-minutes: 5
        runs-on: ubuntu-latest
        steps:
            - name: Checkout the code
              uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
            - uses: pnpm/action-setup@v6
            - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
              with:
                  cache: pnpm
                  node-version-file: "package.json"
            - name: Install dependencies
              run: pnpm install --frozen-lockfile
            - name: Build
              run: pnpm build
            - name: Check (static analysis including linters and types)
              run: pnpm check
            - name: Test
              run: pnpm test
