fix(ci): make @flapi/shared build standalone so the clients gate is green #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Clients (CLI + VSCode) | |
| # Compile/test gate for the TypeScript packages under cli/. This exists so a broken | |
| # build (like the extension being uncompilable for months) is caught on every PR. | |
| # | |
| # Each job builds @flapi/shared first: the CLI and the extension both resolve | |
| # @flapi/shared to its built dist/, and the extension's prebuild invokes shared's | |
| # tsup, which needs shared's devDependencies installed. | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'cli/**' | |
| - '.github/workflows/clients.yaml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'cli/**' | |
| - '.github/workflows/clients.yaml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| shared: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build @flapi/shared | |
| working-directory: cli/shared | |
| run: | | |
| npm ci | |
| npm run build | |
| cli: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build @flapi/shared (dependency) | |
| working-directory: cli/shared | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build & test flapii CLI | |
| working-directory: cli | |
| run: | | |
| npm ci | |
| npm run build | |
| npm test | |
| vscode-extension: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Build @flapi/shared (dependency) | |
| working-directory: cli/shared | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build, typecheck & test the VSCode extension | |
| working-directory: cli/vscode-extension | |
| run: | | |
| npm ci | |
| npm run typecheck | |
| npm run build | |
| npm test |