43 lines
860 B
YAML
43 lines
860 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends pkg-config libssl-dev
|
|
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Check code formatting
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy -- -D warnings
|
|
|
|
- name: Build project
|
|
run: cargo build --release
|
|
|
|
- name: Run tests
|
|
run: cargo test
|
|
|
|
- name: Show binary info
|
|
run: ls -la target/release/auto-commit
|