diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 000000000..e917e2596 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,21 @@ +name: Setup +description: Install pnpm, Node.js and dependencies + +runs: + using: composite + steps: + - uses: pnpm/action-setup@v6.0.9 + name: Install pnpm + with: + version: 11.9.0 + + - name: Install Node.js + uses: actions/setup-node@v6.4.0 + with: + registry-url: "https://registry.npmjs.org/" + node-version: 24 + cache: "pnpm" + + - name: Install dependencies + shell: bash + run: pnpm install --frozen-lockfile diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 99dcc6dea..4aefc80cb 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -10,6 +10,7 @@ on: jobs: build: + name: Build runs-on: ubuntu-latest timeout-minutes: 15 @@ -19,19 +20,8 @@ jobs: with: fetch-depth: 2 - - uses: pnpm/action-setup@v6.0.9 - name: Install pnpm - with: - version: 11.9.0 - - - name: Install Node.js - uses: actions/setup-node@v6.4.0 - with: - registry-url: "https://registry.npmjs.org/" - node-version: 24 - - - name: Install dependencies - run: pnpm install --frozen-lockfile + - name: Setup + uses: ./.github/actions/setup - name: Build Scripts run: pnpm build:scripts @@ -42,11 +32,55 @@ jobs: - name: Run build run: pnpm build - - name: Check formatting + - name: Upload packages + uses: actions/upload-artifact@v7.0.1 + with: + name: packages-dist + path: | + packages/*/dist + plugins/*/dist + include-hidden-files: true + if-no-files-found: error + retention-days: 1 + + lint: + name: Lint + needs: build + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup + uses: ./.github/actions/setup + + - name: Download packages + uses: actions/download-artifact@v8.0.1 + with: + name: packages-dist + + - name: Run lint run: pnpm lint - - name: Run tests - run: pnpm test + test: + name: Test + needs: build + runs-on: ubuntu-latest + timeout-minutes: 15 - - name: Run type tests - run: pnpm test:types + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup + uses: ./.github/actions/setup + + - name: Download packages + uses: actions/download-artifact@v8.0.1 + with: + name: packages-dist + + - name: Run tests + run: pnpm turbo run test test:types --only --continue diff --git a/.github/workflows/bump_publish.yml b/.github/workflows/bump_publish.yml index baaca628c..cca26f63e 100644 --- a/.github/workflows/bump_publish.yml +++ b/.github/workflows/bump_publish.yml @@ -59,6 +59,7 @@ jobs: with: registry-url: "https://registry.npmjs.org/" node-version: 24 + cache: "pnpm" - name: Install dependencies run: pnpm install --frozen-lockfile