feat: Add video support and utility export refinements #14
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: CI | |
| on: | |
| pull_request: | |
| branches: [ main, master ] | |
| types: [ opened, reopened, synchronize, ready_for_review ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || | |
| github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint-typecheck: | |
| name: ci/lint-typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run lint | |
| run: pnpm nx run-many -t lint | |
| --projects=cdg-core,cdg-loader,cdg-player,cdg-controls,demo,framework-demo | |
| --outputStyle=stream | |
| - name: Run typecheck | |
| run: pnpm nx run-many -t typecheck | |
| --projects=cdg-core,cdg-loader,cdg-player,cdg-controls,demo,framework-demo | |
| --outputStyle=stream | |
| unit-test: | |
| name: ci/unit-test | |
| runs-on: ubuntu-latest | |
| needs: lint-typecheck | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run unit tests | |
| run: pnpm run ci:test:coverage | |
| - name: Generate coverage summary | |
| run: node scripts/ci/summarize-coverage.mjs --out coverage/summary.md | |
| - name: Append coverage summary to job summary | |
| run: cat coverage/summary.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-reports | |
| path: coverage/** | |
| - name: Post coverage summary comment | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: marocchino/sticky-pull-request-comment@v3 | |
| with: | |
| header: coverage-summary | |
| path: coverage/summary.md | |
| build: | |
| name: ci/build | |
| runs-on: ubuntu-latest | |
| needs: unit-test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run builds | |
| run: pnpm run ci:build |