-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (45 loc) · 1.4 KB
/
check.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
name: check
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
permissions:
contents: write
jobs:
check-rust:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
# see https://github.com/tauri-apps/tauri/issues/3701
sudo apt-get install -y javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1
# sudo apt-get install libgtk-3-dev
# sudo apt-get install libsoup-3.0-dev
- name: Install Rust
run: rustup toolchain install stable --component llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: install nextest
uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Check code format
run: cd src-tauri && cargo fmt -- --check
- name: Check the package for errors
run: cd src-tauri && cargo check --all
- name: Lint rust sources
run: cd src-tauri && cargo clippy --all-targets --all-features --tests --benches -- -D warnings
- name: Execute rust tests
run: cd src-tauri && cargo nextest run --all-features --no-tests=pass