7
7
branches : [main, develop]
8
8
9
9
jobs :
10
- # rust-tests:
11
- # name: Rust Tests
12
- # runs-on: ubuntu-latest
13
-
14
- # env:
15
- # RUST_BACKTRACE: 1
16
-
17
- # steps:
18
- # - uses: actions/checkout@v4
19
-
20
- # - name: Setup Rust
21
- # uses: actions-rs/toolchain@v1
22
- # with:
23
- # toolchain: stable
24
- # override: true
25
-
26
- # - name: Install Tauri dependencies
27
- # run: |
28
- # sudo apt-get update
29
-
30
- # # Try webkit 4.1 first (Ubuntu 24.04), fallback to 4.0 (older versions)
31
- # if ! sudo apt-get install -y libwebkit2gtk-4.1-dev; then
32
- # sudo apt-get install -y libwebkit2gtk-4.0-dev
33
- # fi
34
-
35
- # # Install other dependencies
36
- # sudo apt-get install -y \
37
- # libgtk-3-dev \
38
- # libayatana-appindicator3-dev \
39
- # librsvg2-dev \
40
- # patchelf
41
-
42
- # - name: Run Rust tests
43
- # working-directory: src-tauri
44
- # run: |
45
- # # Run only library and unit tests, skip integration tests that require Tauri context
46
- # cargo test --lib --bins --verbose
47
-
48
10
frontend-tests :
49
11
name : Frontend Tests
50
12
runs-on : ubuntu-latest
@@ -59,55 +21,29 @@ jobs:
59
21
- name : Setup Node.js
60
22
uses : actions/setup-node@v4
61
23
with :
62
- node-version : 18
63
- cache : npm
64
- registry-url : ' https://registry.npmjs.org'
24
+ node-version : 20
25
+ cache : yarn
65
26
66
- - name : Install dependencies with retry
67
- run : |
68
- # Clear any existing installations
69
- rm -rf node_modules package-lock.json
70
-
71
- # Clean npm cache
72
- npm cache clean --force
73
-
74
- # Install dependencies with retries for robustness
75
- for i in {1..3}; do
76
- echo "Installation attempt $i"
77
- if npm install; then
78
- echo "Installation successful"
79
- break
80
- else
81
- echo "Installation failed, retrying..."
82
- rm -rf node_modules package-lock.json
83
- sleep 5
84
- fi
85
- done
86
-
87
- # Specifically install rollup native binary if missing
88
- if ! npm list @rollup/rollup-linux-x64-gnu >/dev/null 2>&1; then
89
- echo "Installing missing rollup native binary"
90
- npm install @rollup/rollup-linux-x64-gnu --save-optional || true
91
- fi
27
+ - name : Install dependencies
28
+ run : yarn install --frozen-lockfile
92
29
93
30
- name : Run frontend tests
94
- run : |
95
- # Try running tests normally first
96
- if npm run test; then
97
- echo "Tests completed successfully"
98
- else
99
- echo "Tests failed with normal approach, trying alternative..."
100
- # If tests fail, try with alternative approaches
101
- echo "Checking rollup installation..."
102
- npm list rollup || npm install rollup --force
103
- npm run test || {
104
- echo "Frontend tests failed. Checking environment..."
105
- echo "Node version: $(node --version)"
106
- echo "NPM version: $(npm --version)"
107
- echo "Platform: $(uname -a)"
108
- ls -la node_modules/.bin/ | grep -E "(vitest|rollup)" || true
109
- echo "Package contents:"
110
- npm list --depth=0 | grep -E "(vitest|rollup)" || true
111
- exit 1
112
- }
113
- fi
31
+ run : yarn test
32
+
33
+ # rust-tests:
34
+ # name: Rust Tests
35
+ # runs-on: ubuntu-latest
36
+
37
+ # steps:
38
+ # - uses: actions/checkout@v4
39
+
40
+ # - name: Setup Rust
41
+ # uses: dtolnay/rust-toolchain@stable
42
+
43
+ # - name: Cache Rust dependencies
44
+ # uses: swatinem/rust-cache@v2
45
+ # with:
46
+ # workspaces: ./src-tauri -> target
47
+
48
+ # - name: Run Rust tests
49
+ # run: cd src-tauri && cargo test
0 commit comments