-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 1.93 KB
/
rust-check-pull.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
on: pull_request
name: Rust code check
jobs:
code-check-rust:
strategy:
fail-fast: false
matrix:
platform:
- [ self-hosted ]
- [ self-hosted, Windows ]
include:
- platform: [ self-hosted ]
linux: true
- platform: [ self-hosted, Windows ]
windows: true
linux: false
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: ./src-tauri
env:
VAULT_BASE_URL: "placeholder"
VAULT_ROLE_ID: "placeholder"
VAULT_SECRET_ID: "placeholder"
SENTRY_ENVIRONMENT: "placeholder"
SENTRY_URL: "placeholder"
steps:
# Git fix for Windows, workaround for permission issues regarding self-hosted runners
- name: Windows; Git fix
if: ${{ matrix.windows }}
run: |
git config --global --add safe.directory C:/Users/lanman/actions-runner/_work/trokk/trokk
- uses: actions/checkout@v4
- name: Install dependencies (ubuntu only)
if: ${{ matrix.linux }}
run: |
sudo apt-get update -y
sudo apt-get install -y libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- name: Run rustfmt
if: always()
run: cargo fmt --all -- --check
- name: Run clippy
if: always()
run: cargo clippy --all -- -D warnings
- name: Run tests
if: always()
run: cargo test --all