ci: improve GitHub Actions workflow diagnostics

This commit is contained in:
thakares committed 2026-07-22 21:16:48 +05:30
1 parent 36903d2125
commit b6798e7a7c
1 file changed
+56 -10
+56 -10
View File
@@ -7,22 +7,29 @@ on:
pull_request: pull_request:
branches: branches:
- main - main
workflow_dispatch:
permissions: permissions:
contents: read contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs: jobs:
test: test:
name: Rust ${{ matrix.rust }} name: Rust CI
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false
matrix: matrix:
rust: rust:
- stable - stable
steps: steps:
- uses: actions/checkout@v4 - name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust - name: Install Rust
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
@@ -33,14 +40,53 @@ jobs:
- name: Cache Cargo - name: Cache Cargo
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Check formatting - name: Environment Information
run: cargo fmt --check run: |
echo "=== Git ==="
git rev-parse HEAD
git log --oneline -1
git status
- name: Run Clippy echo
run: cargo clippy --workspace --all-targets -- -D warnings echo "=== Rust ==="
rustc --version
cargo --version
- name: Run Tests echo
run: cargo test --workspace --all-features echo "=== System ==="
uname -a
- name: Release Build echo
run: cargo build --release --workspace echo "=== Environment ==="
env | sort
- name: Verify formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
- name: Build
run: cargo build --workspace --all-features --verbose
- name: Run tests
run: cargo test --workspace --all-features --verbose -- --nocapture
- name: Build release
run: cargo build --release --workspace --all-features
- name: Upload test databases
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-databases
path: target/*.db
if-no-files-found: ignore
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: target-directory
path: target
if-no-files-found: ignore