Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Add github workflows for rust and typescript lint checks
Merged rudolfs opened 1 year ago
5 files changed +38 -4 d621f478 b68a31fe
added .github/workflows/check.yml
@@ -0,0 +1,35 @@
+
name: radicle-desktop
+
on: push
+

+
jobs:
+
  lint-ts:
+
    name: lint typescript
+
    runs-on: ubuntu-latest
+
    steps:
+
      - name: Setup Node
+
        uses: actions/setup-node@v4
+
        with:
+
          node-version: "20.9.0"
+
      - uses: actions/checkout@v4
+
      - run: npm ci
+
      - run: npm run check
+
  lint-rust:
+
    name: lint rust
+
    runs-on: ubuntu-latest
+
    defaults:
+
      run:
+
        working-directory: ./src-tauri
+
    steps:
+
      - uses: actions/checkout@v4
+
      - uses: dtolnay/rust-toolchain@stable
+
      - uses: Swatinem/rust-cache@v2
+
        with:
+
          workspaces: src-tauri -> target
+
      - uses: awalsh128/cache-apt-pkgs-action@latest
+
        with:
+
          packages: libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
+
          version: 1.0
+
      - name: Run clippy
+
        run: cargo clippy --all --tests -- -Dwarnings
+
      - name: Check formatting
+
        run: cargo fmt --all --check
added build/.gitkeep
modified src-tauri/build.rs
@@ -1,3 +1,3 @@
fn main() {
-
  tauri_build::build()
+
    tauri_build::build()
}
modified src-tauri/src/auth.rs
@@ -13,7 +13,7 @@ pub fn authenticate(ctx: tauri::State<AppState>) -> Result<(), Error> {
    match ssh::agent::Agent::connect() {
        Ok(mut agent) => {
            if agent.request_identities()?.contains(&profile.public_key) {
-
                return Ok(());
+
                Ok(())
            } else {
                Err(Error::WithHint {
                    err: anyhow!("Not able to find your keys in the ssh agent"),
modified src-tauri/src/lib.rs
@@ -17,8 +17,7 @@ pub fn run() {
                Err(radicle::profile::Error::NotFound(path)) => Err(error::Error::WithHint {
                    err: anyhow::anyhow!("Radicle profile not found in '{}'.", path.display()),
                    hint: "To setup your radicle profile, run `rad auth`.",
-
                }
-
                .into()),
+
                }),
                Err(e) => Err(error::Error::WithHint {
                    err: e.into(),
                    hint: "Could not load radicle profile",