Skip to content

Commit

Permalink
fix: ci (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
zqran authored Nov 27, 2023
1 parent d8675eb commit fabbe6a
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 46 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/daily-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,52 +26,32 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build esbuild
- name: Build and Test esbuild
run: |
cd packages/esbuild
pnpm run build
pnpm serve
- name: Run esbuild tests
run: |
cd packages/esbuild
pnpm test
- name: Build next
- name: Build and Test next
run: |
cd packages/next
pnpm run build
pnpm start
- name: Run next tests
run: |
cd packages/next
pnpm test
- name: Build nuxt
- name: Build and Test nuxt
run: |
cd packages/nuxt
pnpm run build
pnpm preview
- name: Run nuxt tests
run: |
cd packages/nuxt
pnpm test
- name: Build rspack
- name: Build and Test rspack
run: |
cd packages/rspack
pnpm run build
pnpm serve
- name: Run rspack tests
run: |
cd packages/rspack
pnpm test
- name: Build webpack
- name: Build and Test webpack
run: |
cd packages/webpack
pnpm run build
pnpm serve
- name: Run webpack tests
run: |
cd packages/webpack
pnpm test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"dependencies": {
"@blocksuite/blocks": "nightly",
"@blocksuite/editor": "nightly",
"@blocksuite/global": "^0.9.0",
"@blocksuite/global": "nightly",
"@blocksuite/store": "nightly",
"@blocksuite/virgo": "^0.9.0"
"@blocksuite/virgo": "nightly"
},
"devDependencies": {
"@playwright/test": "^1.40.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/esbuild/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
fullyParallel: true,
webServer: {
command: 'pnpm serve',
port: 3000,
// command: process.env.CI ? 'pnpm preview' : 'pnpm dev',
// port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE ?? '',
},
},
use: {
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
Expand Down
3 changes: 1 addition & 2 deletions packages/esbuild/tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '../../../tests/utils/keyboard';
import { assertText, assertEmpty } from '../../../tests/utils/asserts';

const PORT = 3000;
const TEST_URL = `http://localhost:${PORT}`;
const TEST_URL = `http://localhost:3000`;

test.describe('webpack build test', () => {
test('basic input & undo/redo', async ({ page }) => {
Expand Down
10 changes: 10 additions & 0 deletions packages/next/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
fullyParallel: true,
webServer: {
command: 'pnpm start',
port: 3001,
// command: process.env.CI ? 'pnpm preview' : 'pnpm dev',
// port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE ?? '',
},
},
use: {
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
Expand Down
3 changes: 1 addition & 2 deletions packages/next/tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '../../../tests/utils/keyboard';
import { assertText, assertEmpty } from '../../../tests/utils/asserts';

const PORT = 3002;
const TEST_URL = `http://localhost:${PORT}`;
const TEST_URL = `http://localhost:3001`;

test.describe('webpack build test', () => {
test('basic input & undo/redo', async ({ page }) => {
Expand Down
10 changes: 10 additions & 0 deletions packages/nuxt/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
fullyParallel: true,
webServer: {
command: 'pnpm preview',
port: 3002,
// command: process.env.CI ? 'pnpm preview' : 'pnpm dev',
// port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE ?? '',
},
},
use: {
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
Expand Down
3 changes: 1 addition & 2 deletions packages/nuxt/tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '../../../tests/utils/keyboard';
import { assertText, assertEmpty } from '../../../tests/utils/asserts';

const PORT = 3002;
const TEST_URL = `http://localhost:${PORT}`;
const TEST_URL = `http://localhost:3002`;

test.describe('webpack build test', () => {
test('basic input & undo/redo', async ({ page }) => {
Expand Down
10 changes: 10 additions & 0 deletions packages/rspack/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
fullyParallel: true,
webServer: {
command: 'pnpm serve',
port: 3003,
// command: process.env.CI ? 'pnpm preview' : 'pnpm dev',
// port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE ?? '',
},
},
use: {
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
Expand Down
3 changes: 1 addition & 2 deletions packages/rspack/tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '../../../tests/utils/keyboard';
import { assertText, assertEmpty } from '../../../tests/utils/asserts';

const PORT = 3003;
const TEST_URL = `http://localhost:${PORT}`;
const TEST_URL = `http://localhost:3003`;

test.describe('webpack build test', () => {
test('basic input & undo/redo', async ({ page }) => {
Expand Down
10 changes: 10 additions & 0 deletions packages/webpack/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
fullyParallel: true,
webServer: {
command: 'pnpm serve',
port: 3004,
// command: process.env.CI ? 'pnpm preview' : 'pnpm dev',
// port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE ?? '',
},
},
use: {
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
Expand Down
3 changes: 1 addition & 2 deletions packages/webpack/tests/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
} from '../../../tests/utils/keyboard';
import { assertText, assertEmpty } from '../../../tests/utils/asserts';

const PORT = 3004;
const TEST_URL = `http://localhost:${PORT}`;
const TEST_URL = `http://localhost:3004`;

test.describe('webpack build test', () => {
test('basic input & undo/redo', async ({ page }) => {
Expand Down
87 changes: 78 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fabbe6a

Please sign in to comment.