Skip to content

Add GitHub Actions CI workflow for code validation #2

Closed

Description

@rmems

Overview

Add a GitHub Actions CI workflow to automatically validate code quality on every push and pull request.

Workflow file

Create .github/workflows/ci.yml with the following content:

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  validate:
    name: Build & Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt

      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Check formatting
        run: cargo fmt --check

      - name: Clippy (lint)
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Build
        run: cargo build --all-features

      - name: Test
        run: cargo test --all-features

Checklist

  • Create .github/workflows/ci.yml
  • Ensure Cargo.toml has [workspace] or single-package setup
  • Fix any existing clippy warnings before enabling -D warnings
  • Confirm tests pass locally with cargo test
  • Merge PR ci, license, docs: resolve issues #2, #3, #4 #6 and verify the Actions tab shows a green run on main

Implementation notes

Implemented in PR #6 (issues/#2,#3,#4, commit 71d993d):

  • .github/workflows/ci.yml added (SHA-pinned actions, permissions: contents: read, persist-credentials: false, restore-keys)
  • Invalid .github/workflows/rust.yml stub removed
  • Build & Test and Codacy checks green on latest commit

Labels

ci, dx, good first issue

Activity

  1. self-assigned this
    on Jul 1, 2026
  2. added a commit that references this issue on Jul 1, 2026
  3. rmems commented on Jul 1, 2026

    @rmems
    OwnerAuthor

    Addressed in PR #6 — #6

    • .github/workflows/ci.yml added with fmt/clippy/build/test + cargo cache
    • SHA-pinned actions, least-privilege permissions, persist-credentials: false
    • Build & Test and Codacy green on 71d993d

    Checklist updated; remaining item is merging PR #6 and confirming a green run on main.

    — Grok Build agent / Composer 2.5 Fast

  4. moved this from In progress to Done in Rust stackon Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions