ci: move bundle skipping logic to workflow (#21448)

This commit is contained in:
Daniel Roe 2023-06-07 21:07:58 +01:00 committed by GitHub
parent 857511f448
commit c6a7527e51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View File

@ -227,6 +227,7 @@ jobs:
TEST_ENV: ${{ matrix.env }} TEST_ENV: ${{ matrix.env }}
TEST_BUILDER: ${{ matrix.builder }} TEST_BUILDER: ${{ matrix.builder }}
TEST_PAYLOAD: ${{ matrix.payload }} TEST_PAYLOAD: ${{ matrix.payload }}
SKIP_BUNDLE_SIZE: ${{ github.event_name != 'push' || matrix.env == 'dev' || matrix.builder == 'webpack' || matrix.payload == 'js' || runner.os == 'Windows' }}
build-release: build-release:
permissions: permissions:

View File

@ -4,17 +4,8 @@ import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { execaCommand } from 'execa' import { execaCommand } from 'execa'
import { globby } from 'globby' import { globby } from 'globby'
import { join } from 'pathe' import { join } from 'pathe'
import { isWindows } from 'std-env'
import { isRenderingJson } from './utils'
// We only want to run this test for: describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM_CI)('minimal nuxt application', () => {
// - ubuntu
// - vite
// - in our own CI
// - using JS (default) payload rendering
// - production build
describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.env.ECOSYSTEM_CI || !isRenderingJson || process.env.TEST_ENV === 'dev')('minimal nuxt application', () => {
const rootDir = fileURLToPath(new URL('./fixtures/minimal', import.meta.url)) const rootDir = fileURLToPath(new URL('./fixtures/minimal', import.meta.url))
const publicDir = join(rootDir, '.output/public') const publicDir = join(rootDir, '.output/public')
const serverDir = join(rootDir, '.output/server') const serverDir = join(rootDir, '.output/server')