🎯 Task Overview
Set up automated testing in GitHub Actions to run cargo test --all-features on every pull request and push to main branches.
📝 Description
Currently, tests need to be run manually. We need automated CI/CD to:
- Catch regressions early
- Ensure code quality before merging
- Validate all features work together
- Run on multiple Rust versions
🛠️ Implementation Plan
1. Create GitHub Actions Workflow
File: .github/workflows/test.yml
name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
- name: Cache target directory
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests (all features)
run: cargo test --all-features --verbose
- name: Run doctests
run: cargo test --doc --all-features
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-features -- -D warnings
2. Add Status Badges to README
[](https://github.com/ElioNeto/ApexStore/actions)
[](https://github.com/ElioNeto/ApexStore/actions)
3. Branch Protection Rules
Enable on main and develop branches:
- Require PR reviews before merging
- Require status checks to pass (Tests, Clippy)
- Require branches to be up to date
✅ Acceptance Criteria
📊 Expected Benefits
- Automated regression detection
- Consistent code formatting
- Early warning of breaking changes
- Confidence in PR merges
- Professional project presentation
Labels: task, ci/cd, testing, priority:high
Priority: High
Milestone: v2.0
🎯 Task Overview
Set up automated testing in GitHub Actions to run
cargo test --all-featureson every pull request and push to main branches.📝 Description
Currently, tests need to be run manually. We need automated CI/CD to:
🛠️ Implementation Plan
1. Create GitHub Actions Workflow
File:
.github/workflows/test.yml2. Add Status Badges to README
3. Branch Protection Rules
Enable on
mainanddevelopbranches:✅ Acceptance Criteria
📊 Expected Benefits
Labels:
task,ci/cd,testing,priority:highPriority: High
Milestone: v2.0