Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ jobs:
os: ubuntu-latest
- suite: rspress
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: rstest (${{ matrix.suite }})
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rstest-ecosystem-ci-from-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
- rsbuild
- rsdoctor
- modernjs
# - examples
- examples
suiteRefType:
description: "type of suite ref to use"
required: true
Expand Down Expand Up @@ -89,8 +89,8 @@ jobs:
os: ubuntu-latest
- suite: rsdoctor
os: ubuntu-latest
# - suite: examples
# os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rstest-ecosystem-ci-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ on:
- rsbuild
- rsdoctor
- modernjs
- examples
suiteRefType:
description: "type of suite ref to use"
required: true
Expand Down Expand Up @@ -85,6 +86,8 @@ jobs:
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rstest-ecosystem-ci-selected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on:
- rsbuild
- rsdoctor
- modernjs
# - examples
- examples
suiteRefType:
description: "type of suite ref to use"
required: true
Expand Down Expand Up @@ -95,8 +95,8 @@ jobs:
os: ubuntu-latest
- suite: modernjs
os: ubuntu-latest
# - suite: examples
# os: ubuntu-latest
- suite: examples
os: ubuntu-latest
fail-fast: false
runs-on: ${{ matrix.os }}
name: execute-all (${{ matrix.suite }})
Expand Down
14 changes: 14 additions & 0 deletions tests/rstest/examples.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { RunOptions } from '../../types';
import { $, runInRepo } from '../../utils';

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'rstackjs/rstack-examples',
branch: 'main',
test: ['test:rstest'],
beforeTest: async () => {
await $`npx playwright install chromium webkit --with-deps`;
},
});
}
12 changes: 10 additions & 2 deletions tests/rstest/modernjs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { join } from 'node:path';
import cache from '@actions/cache';
import type { RunOptions } from '../../types';
import { $, runInRepo } from '../../utils';
import { $, cd, runInRepo } from '../../utils';

const isGitHubActions = !!process.env.GITHUB_ACTIONS;

Expand Down Expand Up @@ -42,6 +42,14 @@ export async function test(options: RunOptions) {
await cache.saveCache([nxCachePath], nxCacheKey);
}
},
test: ['test:ut'],
test: [
'test:ut',
async () => {
cd('./tests');
await $`npx playwright install chromium webkit --with-deps`;
await $`pnpm run test:rstest`;
cd('..');
},
],
});
}
Loading