Skip to content

[BOUNTY] GitHub Actions CI Pipeline — Automated Tests + Linting + PR Checks (75 RTC) #158

@Scottcjn

Description

@Scottcjn

CI/CD Pipeline — 75 RTC Bounty

Set up a GitHub Actions CI pipeline that runs on every PR. This is a force multiplier — it makes every future contribution better.

Requirements

Workflow: .github/workflows/ci.yml

Must run on every push to main and every PR:

  1. Linting — flake8 or ruff with reasonable config (not overly strict on existing code)
  2. Type checking — mypy on new code (gradual adoption, not whole repo)
  3. Unit tests — pytest suite with at least 10 meaningful tests covering:
    • _compute_hardware_id() — verify different inputs produce different hashes
    • validate_fingerprint_data() — VM detection, clock drift thresholds
    • current_slot() — epoch calculation from genesis timestamp
    • Balance operations — credit, debit, transfer validation
    • API endpoint responses — health, epoch, miners (mocked)
    • Address validation — RTC address format
    • Hardware multiplier lookup — correct values for G4, G5, modern, etc.
    • Attestation TTL — expired vs valid attestations
    • Fee calculation — withdrawal fees, transfer fees
    • Nonce replay protection — duplicate detection
  4. Security scan — bandit or safety for known vulnerability patterns
  5. PR status checks — Block merge if CI fails

Badge:
Add CI status badge to README:

[![CI](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml)

Payout Structure

Milestone RTC
Working CI workflow (lint + tests run on PR) 30
10+ meaningful tests passing 25
Security scan + PR status checks + badge 20

Partial credit available.

Key Files to Test

  • rustchain_v2_integrated_v2.2.1_rip200.py — Main node server
  • rewards_implementation_rip200.py — Reward calculation
  • rip_200_round_robin_1cpu1vote.py — Consensus logic
  • fingerprint_checks.py — Hardware fingerprinting

Constraints

  • Tests must be self-contained (no live API dependency in CI)
  • Use mocking/fixtures for database and network calls
  • Keep CI run under 5 minutes
  • Don't break existing code — the linter config should be lenient on legacy code

Submission

  1. Comment on this issue that you're working on it
  2. Submit a PR with the workflow file + test suite
  3. Show the CI passing on your fork before submitting
  4. Include screenshot of green CI checks

What Gets Rejected

  • Empty workflow files that just echo "tests pass"
  • Tests that don't actually test anything (assert True)
  • Overly strict linting that flags 500+ existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountyRTC bounty rewardhelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions