From b76e7c84d9a4b98d6e4d8747411de423b99db889 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Sat, 24 Aug 2024 18:26:27 +0200 Subject: [PATCH] ci: commit vitest files after auto update it --- .github/workflows/build.yml | 92 +++++++++++++++++++++++++------------ package.json | 3 +- 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e02e30be1e7..ccf1af3febe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,15 @@ jobs: run: yarn test:integration env: FORCE_COLOR: true - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-integration-${{ matrix.os }}-${{ matrix.version }} + overwrite: true + path: | + packages/platform/platform-express/vitest.config.mts + packages/platform/platform-koa/vitest.config.mts + continue-on-error: true test-core: runs-on: ubuntu-latest @@ -89,6 +97,15 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:core --since origin/production + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-core + path: | + packages/{core,di,engines}/vitest.config.mts + packages/platform/common/vitest.config.mts + packages/utils/normalize-path/vitest.config.mts + continue-on-error: true test-specs: runs-on: ubuntu-latest @@ -111,7 +128,13 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:specs --since origin/production - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-specs + path: | + packages/specs/*/vitest.config.mts + continue-on-error: true test-platform: runs-on: ubuntu-latest @@ -133,7 +156,14 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:platform --since origin/production - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-platform + path: | + packages/platform/platform-*/vitest.config.mts + !packages/platform/platform-express/vitest.config.mts + !packages/platform/platform-koa/vitest.config.mts test-orm: runs-on: ubuntu-latest @@ -155,7 +185,12 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:orm --since origin/production - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config + path: | + packages/orm/*/vitest.config.mts test-graphql: runs-on: ubuntu-latest @@ -177,7 +212,12 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:graphql --since origin/production - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-graphql + path: | + packages/graphql/*/vitest.config.mts test-security: runs-on: ubuntu-latest @@ -199,7 +239,12 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:security --since origin/production - + - name: Upload vitest config files + uses: actions/upload-artifact@v4 + with: + name: vitest-config-security + path: | + packages/security/*/vitest.config.mts test-third-parties: runs-on: ubuntu-latest @@ -221,33 +266,16 @@ jobs: run: yarn tsc --build - name: Run test run: yarn test:third-parties --since origin/production - - test-formio: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [20.12.2] - - steps: - - uses: actions/checkout@v3 + - name: Upload vitest config files + uses: actions/upload-artifact@v4 with: - fetch-depth: 0 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies - run: yarn install --immutable --network-timeout 500000 - - name: Run build - run: yarn tsc --build - - name: Run test - run: yarn test:formio --since origin/production + name: vitest-config-third-parties + path: | + packages/third-parties/*/vitest.config.mts deploy-packages: runs-on: ubuntu-latest - needs: - [lint, test-core, test-specs, test-platform, test-integration, test-orm, test-security, test-graphql, test-third-parties, test-formio] + needs: [lint, test-core, test-specs, test-platform, test-integration, test-orm, test-security, test-graphql, test-third-parties] if: github.event_name != 'pull_request' && contains(' refs/heads/production refs/heads/alpha @@ -267,6 +295,12 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies run: yarn install --network-timeout 500000 + + - name: Download Core vitest config files + uses: actions/download-artifact@v3 + with: + path: . + - name: Release packages env: CI: true diff --git a/package.json b/package.json index 6e227eb790e..50144c858e1 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,7 @@ "test:graphql": "lerna run test:ci --scope '@tsed/{apollo,typegraphql}' --stream", "test:security": "lerna run test:ci --scope '@tsed/{jwks,oidc-provider,passport,oidc-provider-plugin-wildcard-redirect-uri}' --stream", "test:specs": "lerna run test --scope '@tsed/{ajv,exceptions,json-mapper,schema,swagger}' --stream --concurrency 2", - "test:third-parties": "lerna run test:ci --scope '@tsed/{agenda,bullmq,components-scan,event-emitter,formio,pulse,sse,socketio,stripe,temporal,terminus,vike,vite-ssr-plugin}' --stream --concurrency 4", - "test:formio": "lerna run test:ci --scope '@tsed/{schema-formio,formio}' --stream", + "test:third-parties": "lerna run test:ci --scope '@tsed/{agenda,bullmq,components-scan,event-emitter,formio,pulse,sse,socketio,stripe,temporal,terminus,vike,vite-ssr-plugin,schema-formio,formio}' --stream --concurrency 4", "coverage": "merge-istanbul --out coverage/coverage-final.json \"**/packages/**/coverage/coverage-final.json\" && nyc report --reporter text --reporter html --reporter lcov -t coverage --report-dir coverage", "barrels": "lerna run barrels", "build": "monorepo build --verbose",