ci: test built packages (#19767)

This commit is contained in:
Daniel Roe 2023-03-17 15:24:39 +00:00 committed by GitHub
parent 81da4cf5a2
commit 4635420e8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 10 deletions

View File

@ -54,9 +54,6 @@ jobs:
- name: Build
run: pnpm build
- name: Test (types)
run: pnpm test:types
- name: Cache dist
uses: actions/upload-artifact@v3
with:
@ -64,6 +61,32 @@ jobs:
name: dist
path: packages/*/dist
typecheck:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- build
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Restore dist cache
uses: actions/download-artifact@v3
with:
name: dist
path: packages
- name: Test (types)
run: pnpm test:types
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
@ -84,6 +107,8 @@ jobs:
test-fixtures:
runs-on: ${{ matrix.os }}
needs:
- build
strategy:
fail-fast: false
@ -136,8 +161,11 @@ jobs:
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
run: pnpm playwright install chromium
- name: Build (stub)
run: pnpm build:stub
- name: Restore dist cache
uses: actions/download-artifact@v3
with:
name: dist
path: packages
- name: Test (unit)
run: pnpm test:unit

View File

@ -6,13 +6,10 @@ import { isWindows } from 'std-env'
export default defineConfig({
resolve: {
alias: {
'#app': resolve('./packages/nuxt/src/app/index.ts'),
'@nuxt/test-utils': resolve('./packages/test-utils/src/index.ts')
'#app': resolve('./packages/nuxt/dist/app/index'),
'@nuxt/test-utils': resolve('./packages/test-utils/dist/index')
}
},
esbuild: {
tsconfigRaw: '{}'
},
test: {
globalSetup: 'test/setup.ts',
testTimeout: isWindows ? 60000 : 10000,