-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 1.56 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
jobs:
build-rust-binary:
runs-on: macos-latest
env:
# Ensure the correct target architecture is set
CARGO_TARGET_DIR: target
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
# Set up Rust with the appropriate toolchain
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
target/
key: aarch64-apple-darwin-cargo-macos-latest-2
# Install dependencies
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install npm dependencies
run: npm ci
- name: Npm test unit
run: npm test
# Build the Rust binary with napi
- name: Build Rust Binary with napi
run: npm run build:debug
- name: Check tree is clean
run: bash ./clean-tree.sh
- name: Npm test (binary)
run: npm run test:build
- name: Npm run build:example
run: npm run build:example
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30