mirror of
https://github.com/actionbook/actionbook.git
synced 2026-09-19 03:28:06 +08:00
ccac471dda
--test-threads is a test harness argument, not a cargo argument, so it must come after the -- separator.
72 lines
1.6 KiB
YAML
72 lines
1.6 KiB
YAML
name: Tests (cli, Windows)
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "release/**"]
|
|
paths:
|
|
- "packages/cli/**"
|
|
pull_request:
|
|
branches: [main, "release/**"]
|
|
paths:
|
|
- "packages/cli/**"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
|
|
jobs:
|
|
unit-tests-windows:
|
|
name: Unit Tests (Windows)
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache Rust build
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: packages/cli
|
|
shared-key: unit-tests-windows
|
|
|
|
- name: Run unit tests (Windows)
|
|
working-directory: packages/cli
|
|
run: cargo test --lib
|
|
|
|
e2e-tests-windows:
|
|
name: E2E Tests (Windows)
|
|
# Only run on merge to main/release branches or manual trigger, not on PRs
|
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache Rust build
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: packages/cli
|
|
shared-key: e2e-tests-windows
|
|
|
|
- name: Install Chrome
|
|
uses: browser-actions/setup-chrome@v1
|
|
with:
|
|
chrome-version: stable
|
|
|
|
- name: Run E2E tests (Windows)
|
|
working-directory: packages/cli
|
|
env:
|
|
RUN_E2E_TESTS: "true"
|
|
run: cargo test --test e2e -- --test-threads=1
|