-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (50 loc) · 1.34 KB
/
test-all.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
name: test
on:
pull_request:
branches:
- "*"
push:
branches:
- main
tags-ignore:
- "*"
jobs:
test:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
env:
RUST_BACKTRACE: "full"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest, ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v3
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: Install dependencies and create directories
env:
DEBIAN_FRONTEND: "noninteractive"
run: |
sudo apt update && sudo apt install -y libdbus-1-dev gnome-keyring dbus-x11
mkdir -p ~/.cache ~/.local/share/keyrings
if: runner.os == 'Linux'
- name: Test on Linux
if: runner.os == 'Linux'
run: |
cargo fmt -- --check
cargo clippy --release
export $(dbus-launch)
eval "printf '\n' | gnome-keyring-daemon --unlock"
cargo test
- name: Test on Windows/macOS
if: runner.os != 'Linux'
run: |
cargo fmt -- --check
cargo clippy --release
cargo test