-
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.31 KB
/
test.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
67
68
69
70
71
72
73
74
75
76
77
name: App Test
on:
push:
paths-ignore:
- '"**/*.md"'
- '"**/*.mdx"'
- '.vscode/**'
- 'coverage/**'
- 'docs/**'
branches:
- main
pull_request:
paths-ignore:
- '"**/*.md"'
- '"**/*.mdx"'
- '.vscode/**'
- 'coverage/**'
- 'docs/**'
workflow_dispatch:
jobs:
cargo-test:
timeout-minutes: 10
# ignore if commit message contains chore or ci
if: ${{ !contains(github.event.head_commit.message, 'ci:') && !contains(github.event.head_commit.message, 'chore:') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install dependencies
run: cargo build --verbose
working-directory: ./src-tauri/
- name: Run tests
run: cargo test --verbose
working-directory: ./src-tauri/
npm-test:
timeout-minutes: 10
# ignore if commit message contains chore or ci
if: ${{ !contains(github.event.head_commit.message, 'ci:') && !contains(github.event.head_commit.message, 'chore:') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm' # Set this to npm, yarn or pnpm.
- name: Install dependencies
run: npm install
working-directory: ./src-tauri/
- name: Run tests
run: npm run test
working-directory: ./src-tauri/