-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (52 loc) · 1.59 KB
/
rust_tests.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
name: Rust tests
on:
push:
branches: [main, dev]
# pull_request:
# branches: ["**"]
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ./src-tauri
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-20.04
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
steps:
- name: Install minimal stable
uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v4
- uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
key: ${{ matrix.os }}-${{ matrix.target }}
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build
run: cargo build --tests --workspace
- name: Run tests
# Profile "ci" is configured in .config/nextest.toml
run: cargo nextest run --workspace --profile ci
env:
CANVAS_TOKEN: ${{ secrets.CANVAS_TOKEN }}
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: junit-${{ matrix.os }}.xml
path: target/nextest/ci/junit.xml