ci: add Gitea CI workflow (fmt, clippy, tests)
All checks were successful
CI / fmt (push) Successful in 18s
CI / clippy (push) Successful in 2m37s
CI / test (push) Successful in 3m43s

This commit is contained in:
2026-05-30 02:26:54 +02:00
parent 62c9bf2e4e
commit ca949691e4
2 changed files with 36 additions and 1 deletions

32
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,32 @@
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

View File

@@ -37,7 +37,10 @@ impl ActivityPubService {
.shared_inbox_url
.as_ref()
.map(|u| u.to_string()),
display_name: remote_actor.display_name.clone().or_else(|| Some(remote_actor.username.clone())),
display_name: remote_actor
.display_name
.clone()
.or_else(|| Some(remote_actor.username.clone())),
avatar_url: remote_actor.avatar_url.as_ref().map(|u| u.to_string()),
outbox_url: Some(remote_actor.outbox_url.to_string()),
bio: remote_actor.bio.clone(),