feat: add basic rust ci workflow

This commit is contained in:
Suyog Tandel
2026-06-23 23:03:27 +05:30
parent e3dc8fc1c6
commit 77db0aec49
4 changed files with 50 additions and 2 deletions
+40
View File
@@ -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
+7
View File
@@ -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
+2 -2
View File
@@ -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 }}