From 77db0aec49af8d42c0824f56c0f3fb497dd87037 Mon Sep 17 00:00:00 2001 From: Suyog Tandel Date: Tue, 23 Jun 2026 23:03:27 +0530 Subject: [PATCH] feat: add basic rust ci workflow --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 7 ++++++ .github/workflows/wiki-sync.yml | 4 ++-- .gitignore | 1 + 4 files changed, 50 insertions(+), 2 deletions(-) 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..4b05daf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +env: + CARGO_TERM_COLOR: always + +jobs: + ci: + name: CI Checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v22 + + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@v14 + + - name: Check formatting + run: nix develop --command cargo fmt --all -- --check + + - name: Run cargo check + run: nix develop --command cargo check --all-targets + + - name: Run clippy + run: nix develop --command cargo clippy --all-targets -- -D warnings + + - name: Build project + run: nix develop --command cargo build --verbose + + - name: Run tests + run: nix develop --command cargo test --verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f91756..ed4ec4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,9 +4,16 @@ on: branches: - release workflow_dispatch: + workflow_run: + workflows: ["CI"] + branches: + - release + types: + - completed jobs: build-and-release: + if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' permissions: contents: write issues: write diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml index cc17c3d..19c963c 100644 --- a/.github/workflows/wiki-sync.yml +++ b/.github/workflows/wiki-sync.yml @@ -19,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Push to Wiki - uses: Andrew-Chen-Wang/github-wiki-action@v4 + uses: Andrew-Chen-Wang/github-wiki-action@v5 with: path: docs token: ${{ secrets.WIKI_SYNC_PAT_TOKEN }} diff --git a/.gitignore b/.gitignore index 9c44668..a529951 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ packaging .cargo-packager llm-texts opencode.jsonc +AGENTS.md