Skip to content

ci: split workflows and improve CI efficiency #11

ci: split workflows and improve CI efficiency

ci: split workflows and improve CI efficiency #11

Workflow file for this run

name: PR Check
on:
pull_request:
push:
branches: [ main ]
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- name: Check formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Lint with Clippy
run: cargo clippy --workspace --all-features -- -D warnings -A clippy::needless_lifetimes
test:
strategy:
matrix:
crate: [pubky, pubky-common, pubky-homeserver, pubky-testnet, http-relay]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Nextest
uses: taiki-e/install-action@nextest
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Run tests
run: |
set -e
cargo nextest run \
-p ${{ matrix.crate }} \
--all-features \
--test-threads num-cpus \
--retries 2 \
--no-fail-fast \
--no-capture \
-s \
--verbose || true
echo "Tests completed for ${{ matrix.crate }}"