Add Gitea Actions workflow: ci.yml
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-01-31 11:29:50 +00:00
parent 93b90071b7
commit e9480b0e06

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

@@ -0,0 +1,48 @@
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions/setup-rust@v1
with:
rust-version: stable
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgit2-dev pkg-config libssl-dev
- name: Build
run: cargo build --all-features
- name: Run tests
run: cargo test --all
- name: Run clippy
run: cargo clippy --all-features -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check