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
19 changes: 10 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ jobs:
run: |
set -euo pipefail
mkdir -p bench-output
for crate in \
ras-jsonrpc-macro \
ras-rest-macro \
ras-file-macro \
ras-jsonrpc-bidirectional-macro
while read -r crate bench
do
echo "::group::$crate"
cargo bench -p "$crate" -- \
echo "::group::$crate/$bench"
cargo bench -p "$crate" --bench "$bench" -- \
--warm-up-time 1 --measurement-time 3 \
| tee "bench-output/$crate.txt"
| tee "bench-output/$crate-$bench.txt"
echo "::endgroup::"
done
done <<'BENCHES'
ras-jsonrpc-macro dispatch
ras-rest-macro dispatch
ras-file-macro streaming
ras-jsonrpc-bidirectional-macro roundtrip
BENCHES
- name: Upload bench artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,56 @@ jobs:
- name: Run tests
run: cargo test --workspace --all-features -- --nocapture --test-threads=4

playwright:
name: Playwright E2E
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo
uses: Swatinem/rust-cache@v2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: tests/playwright/package-lock.json

- name: Install Playwright package
working-directory: tests/playwright
run: npm ci

- name: Install Playwright browsers
working-directory: tests/playwright
run: npx playwright install --with-deps chromium

- name: Run Playwright tests
working-directory: tests/playwright
run: npm test

- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: tests/playwright/playwright-report
if-no-files-found: ignore
retention-days: 7

- name: Upload Playwright test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-test-results
path: tests/playwright/test-results
if-no-files-found: ignore
retention-days: 7

coverage:
name: Coverage report
runs-on: ubuntu-latest
Expand Down
36 changes: 36 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ members = [
"examples/rest-wasm-example/rest-api",
"examples/rest-wasm-example/rest-backend",
"examples/wasm-ui-demo",
"tests/playwright/fixtures/*",
]
resolver = "3"

Expand Down
Loading
Loading