|
8 | 8 | CARGO_TERM_COLOR: always |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - check: |
| 11 | + rust-lint: |
| 12 | + name: Rust Lint |
12 | 13 | runs-on: ubuntu-latest |
13 | 14 | timeout-minutes: 30 |
| 15 | + permissions: |
| 16 | + contents: read |
14 | 17 | steps: |
15 | 18 | - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
16 | | - - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable |
17 | | - with: |
18 | | - components: rustfmt, clippy |
| 19 | + - uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1 |
19 | 20 | - uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2 |
20 | | - - run: cargo fmt --all -- --check |
21 | | - - run: cargo clippy --workspace --all-targets -- -D warnings |
22 | | - - run: cargo test --workspace |
23 | | - - run: cargo install cargo-audit --locked |
24 | | - - run: cargo audit --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2024-0384 |
25 | | - - run: cargo install cargo-deny --locked |
26 | | - - run: cargo deny check |
| 21 | + - name: Format check |
| 22 | + run: just fmt-check |
| 23 | + - name: Clippy |
| 24 | + run: just clippy |
| 25 | + |
| 26 | + unit-tests: |
| 27 | + name: Unit Tests |
| 28 | + runs-on: ubuntu-latest |
| 29 | + timeout-minutes: 30 |
| 30 | + permissions: |
| 31 | + contents: read |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 34 | + - uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1 |
| 35 | + - uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2 |
| 36 | + - name: Unit tests |
| 37 | + run: just test-unit |
| 38 | + |
| 39 | + desktop: |
| 40 | + name: Desktop |
| 41 | + runs-on: ubuntu-latest |
| 42 | + timeout-minutes: 45 |
| 43 | + permissions: |
| 44 | + contents: read |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 47 | + - uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1 |
| 48 | + - uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2 |
| 49 | + with: |
| 50 | + workspaces: desktop/src-tauri |
| 51 | + - name: Install Tauri dependencies (Linux) |
| 52 | + env: |
| 53 | + DEBIAN_FRONTEND: noninteractive |
| 54 | + run: | |
| 55 | + sudo apt-get update \ |
| 56 | + -o Acquire::Retries=3 \ |
| 57 | + -o Acquire::http::Timeout=30 \ |
| 58 | + -o Acquire::https::Timeout=30 |
| 59 | + sudo apt-get install -y --no-install-recommends \ |
| 60 | + -o Acquire::Retries=3 \ |
| 61 | + -o Acquire::http::Timeout=30 \ |
| 62 | + -o Acquire::https::Timeout=30 \ |
| 63 | + -o DPkg::Lock::Timeout=120 \ |
| 64 | + build-essential \ |
| 65 | + curl \ |
| 66 | + file \ |
| 67 | + libayatana-appindicator3-dev \ |
| 68 | + libgtk-3-dev \ |
| 69 | + librsvg2-dev \ |
| 70 | + libssl-dev \ |
| 71 | + libwebkit2gtk-4.1-dev \ |
| 72 | + libxdo-dev \ |
| 73 | + patchelf \ |
| 74 | + wget |
| 75 | + - name: Install desktop dependencies |
| 76 | + run: just desktop-install-ci |
| 77 | + - name: Desktop lint and format |
| 78 | + run: just desktop-check |
| 79 | + - name: Desktop build |
| 80 | + run: just desktop-build |
| 81 | + - name: Desktop Tauri check |
| 82 | + run: just desktop-tauri-check |
| 83 | + |
| 84 | + security: |
| 85 | + name: Security |
| 86 | + runs-on: ubuntu-latest |
| 87 | + timeout-minutes: 20 |
| 88 | + permissions: |
| 89 | + contents: read |
| 90 | + steps: |
| 91 | + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 |
| 92 | + - uses: cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1 |
| 93 | + - name: Dependency policy |
| 94 | + run: cargo-deny check |
0 commit comments