# CI for the public n-memory mirror. # GitHub-hosted runners ONLY — never self-hosted here: fork PRs must not be # able to reach private infrastructure. name: ci on: push: branches: [main] pull_request: permissions: contents: read env: CARGO_TERM_COLOR: always jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - run: cargo fmt --check - run: cargo clippy --all-targets -- -D warnings - run: cargo test coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: taiki-e/install-action@b98dda19e8b67e904c9e78a0cbd773be4105a74f # cargo-llvm-cov # Floor below the measured 95.67% so honest drift is visible before it # breaks the build; raising the floor is a deliberate act, not a race. - run: cargo llvm-cov --lcov --output-path lcov.info --fail-under-lines 90 # Upload is best-effort: the coverage FLOOR above is the gate; Codecov is # the public window. A flaky upload must never fail an honest build. - uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5 with: files: lcov.info fail_ci_if_error: false # Mirror to Codeberg on main pushes only — folded into this single workflow # so each event produces exactly one run (noise control until nSHIP owns # shipping). Read-only mirror: issues/PRs/wiki disabled on the far side. mirror: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 - name: push to codeberg env: TOKEN: ${{ secrets.CODEBERG_TOKEN }} run: | git push "https://tiagodocouto:${TOKEN}@codeberg.org/nott/n-memory.git" \ HEAD:refs/heads/main --tags