Merge pull request #330 from karts/add-3d-printing-feeds #261
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: Continuous Integration | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Determine relevant changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| app: ${{ contains(fromJSON(steps.filter.outputs.changes), 'app') && 'true' || 'false' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Filter paths | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| app: | |
| - 'src/**' | |
| - 'package.json' | |
| - 'bun.lock' | |
| - 'svelte.config.*' | |
| - 'vite.config.*' | |
| - 'tsconfig*.json' | |
| - 'vitest*.ts' | |
| - 'tailwind.config.*' | |
| - 'static/**' | |
| setup: | |
| name: Install Dependencies | |
| runs-on: ubuntu-latest | |
| needs: changes | |
| if: needs.changes.outputs['app'] == 'true' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache Bun dependencies | |
| id: bun-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
| - name: Install dependencies (if cache miss) | |
| if: steps.bun-cache.outputs.cache-hit != 'true' | |
| run: bun install --frozen-lockfile | |
| type-check: | |
| name: Type & Svelte Check | |
| needs: [setup, changes] | |
| if: needs.changes.outputs['app'] == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Restore Bun cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run TypeScript & Svelte checks | |
| run: bunx --yes svelte-kit sync && bunx --yes svelte-check --tsconfig ./tsconfig.svelte-check.json |