forked from jamesaphoenix/diff-core
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 2.03 KB
/
Copy pathci.yml
File metadata and controls
73 lines (59 loc) · 2.03 KB
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
67
68
69
70
71
72
73
name: CI
on:
pull_request:
push:
tags-ignore:
- "v*"
workflow_call:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
verify:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: npm
cache-dependency-path: crates/diffcore-tauri/ui/package-lock.json
- name: Install UI dependencies
working-directory: crates/diffcore-tauri/ui
run: npm ci
- name: Build UI
working-directory: crates/diffcore-tauri/ui
run: npm run build
- name: Run Rust test suite
run: cargo test --workspace --locked
# Runs after the Rust suite so an E2E flake cannot stop it reporting.
# CI uses npm's prebuilt browsers, which are fine on ubuntu; the nix
# devshell instead supplies pkgs.playwright-driver.browsers, because the
# npm builds are unpatched and will not launch on NixOS. Both paths need
# the browser revision to match the pinned @playwright/test version.
- name: Install Playwright browser
working-directory: crates/diffcore-tauri/ui
run: npx playwright install --with-deps chromium
- name: Run Playwright E2E suite
working-directory: crates/diffcore-tauri/ui
run: npx playwright test
- name: Upload Playwright report on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: |
crates/diffcore-tauri/ui/playwright-report/
crates/diffcore-tauri/ui/test-results/
retention-days: 7