From 58a2471287bcf05842c97f682062afc1201f8338 Mon Sep 17 00:00:00 2001 From: Simon Garcia Date: Mon, 22 Dec 2025 22:09:58 +0100 Subject: [PATCH] Add GitHub Actions CI workflow and status badge Adds automated testing workflow that runs on every push to master and pull requests. The workflow runs cargo test and cargo build to ensure code quality. Also adds CI status badge to README to show build/test status at a glance. --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..32a8774 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + + - name: Cache cargo index + uses: actions/cache@v4 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-index- + + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-build-target- + + - name: Run tests + run: cargo test --verbose + + - name: Run build + run: cargo build --verbose --release diff --git a/README.md b/README.md index 7c06f53..cfa78cf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # code_search +![CI](https://github.com/CamonZ/code_search/actions/workflows/ci.yml/badge.svg) + A CLI tool for querying Elixir/Erlang call graph data stored in CozoDB. Designed for LLMs to efficiently explore and understand codebases without consuming context windows by reading source files directly. ## Why?