doubleo7/.forgejo/workflows/deep_research-ci.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

name: deep_research CI
on:
push:
branches: ['**']
paths:
- 'deep_research/**'
- '.forgejo/workflows/deep_research-ci.yml'
pull_request:
paths:
- 'deep_research/**'
- '.forgejo/workflows/deep_research-ci.yml'
jobs:
test:
runs-on: docker
container: rust:1-bookworm
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Cache cargo registry and build artifacts
uses: https://code.forgejo.org/actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Install rustfmt and clippy
run: rustup component add rustfmt clippy
- name: Check formatting
run: cargo fmt -p deep_research -- --check
- name: Lint
run: cargo clippy -p deep_research --all-targets -- -D warnings
- name: Build
run: cargo build -p deep_research
- name: Test
run: cargo test -p deep_research