diff --git a/.github/workflows/test-built-unit.yml b/.github/workflows/test-built-unit.yml new file mode 100644 index 0000000000..eeec94f45f --- /dev/null +++ b/.github/workflows/test-built-unit.yml @@ -0,0 +1,37 @@ +name: Test unit on built packages + +on: + push: + branches: [main, release] + pull_request: + workflow_dispatch: + merge_group: + types: + - checks_requested + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Use Node.js 24.x + uses: actions/setup-node@v4 + with: + node-version: 24.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Test unit + run: pnpm test:built-unit-and-attest diff --git a/.github/workflows/ci.yml b/.github/workflows/test-docs.yml similarity index 78% rename from .github/workflows/ci.yml rename to .github/workflows/test-docs.yml index b80fa381dc..06a244aa52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test-docs.yml @@ -1,4 +1,4 @@ -name: CI +name: Test docs on: push: @@ -9,6 +9,10 @@ on: types: - checks_requested +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build-and-test: runs-on: ubuntu-latest @@ -29,8 +33,5 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Test - run: pnpm test - - name: Build docs - run: cd apps/typegpu-docs && pnpm build + run: pnpm run --filter typegpu-docs build diff --git a/.github/workflows/test-misc.yml b/.github/workflows/test-misc.yml new file mode 100644 index 0000000000..d4da5d8997 --- /dev/null +++ b/.github/workflows/test-misc.yml @@ -0,0 +1,37 @@ +name: Test style, types and circular deps + +on: + push: + branches: [main, release] + pull_request: + workflow_dispatch: + merge_group: + types: + - checks_requested + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Use Node.js 24.x + uses: actions/setup-node@v4 + with: + node-version: 24.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Test miscellaneous + run: pnpm test:style && pnpm test:types && pnpm run test:circular-deps diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 0000000000..c4b46547df --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -0,0 +1,37 @@ +name: Test unit on source + +on: + push: + branches: [main, release] + pull_request: + workflow_dispatch: + merge_group: + types: + - checks_requested + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Use Node.js 24.x + uses: actions/setup-node@v4 + with: + node-version: 24.x + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Test unit + run: pnpm test:unit-and-attest diff --git a/apps/infra-benchmarks/tsconfig.json b/apps/infra-benchmarks/tsconfig.json new file mode 100644 index 0000000000..6c933fc4e5 --- /dev/null +++ b/apps/infra-benchmarks/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "declaration": false, + "emitDeclarationOnly": false, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src/**/*.ts"] +} diff --git a/apps/typegpu-docs/vitest.config.mts b/apps/typegpu-docs/vitest.config.mts index 631620a9d3..7d092850a7 100644 --- a/apps/typegpu-docs/vitest.config.mts +++ b/apps/typegpu-docs/vitest.config.mts @@ -40,6 +40,7 @@ export default defineConfig({ name: 'individual-example-tests', root: './tests/individual-example-tests', environment: 'node', + isolate: false, }, }, ], diff --git a/packages/typegpu/vitest.config.mts b/packages/typegpu/vitest.config.mts index 67a95a2d23..88a3c9a03c 100644 --- a/packages/typegpu/vitest.config.mts +++ b/packages/typegpu/vitest.config.mts @@ -17,5 +17,6 @@ export default defineConfig({ ? [...configDefaults.exclude, 'tests/internal/**/*.{test,spec}.?(c|m)[jt]s?(x)'] : configDefaults.exclude, globalSetup: ['setupVitest.ts'], + isolate: false, }, }); diff --git a/tsconfig.json b/tsconfig.json index 96601e6077..3f81f85b33 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,5 +6,5 @@ "noEmit": true, "jsx": "react-jsx" }, - "exclude": ["**/dist"] + "exclude": ["**/dist", "**/node_modules", "node_modules", "apps/**"] }