Skip to content

Conversation

@alexdewar
Copy link
Collaborator

Description

I've been fiddling with our CI workflow for running tests while working on #616 and realised it could be simplified a bit. Previously, the Ubuntu runner was also checking documentation and uploading test coverage in addition to running the actual tests, but now the only extra thing it's doing is uploading coverage, so it's simpler if we just have one "job" that covers all the runners.

I also made various other small tweaks, including changing the name of the workflow (so we'll need to update our branch protection rules).

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@alexdewar alexdewar requested a review from Copilot June 12, 2025 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR consolidates the separate build/test and coverage workflows into a single matrix-based job, simplifying CI and reducing duplication.

  • Merged build_and_test and coverage jobs into one build_and_test job with an OS matrix
  • Removed the old cargo-build-and-test.yml
  • Added a reusable composite action for code coverage

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/cargo-test.yml New unified workflow defining test matrix & coverage upload on Ubuntu
.github/workflows/cargo-build-and-test.yml Deleted legacy workflow (redundant after merge)
.github/actions/codecov/action.yml New composite action to install and run coverage tools
Comments suppressed due to low confidence (3)

.github/workflows/cargo-test.yml:1

  • [nitpick] Consider updating the workflow name to reflect both build, test, and coverage (e.g., CI / Build & Test & Coverage) so it’s clear in the UI what the job encompasses.
name: Cargo Test

.github/workflows/cargo-test.yml:27

  • [nitpick] Pin the local composite action to a specific ref or tag if it becomes external in the future, to avoid unintentional changes when the action is updated.
    - if: ${{ matrix.os == 'ubuntu-latest' }}

.github/workflows/cargo-test.yml:4

  • Remember to update branch protection rules or any external documentation that reference the old Cargo Build & Test workflow name.
  push:

@alexdewar alexdewar added this to MUSE Jun 12, 2025
@alexdewar alexdewar moved this to 👀 In review in MUSE Jun 12, 2025
@alexdewar alexdewar requested a review from tsmbland June 12, 2025 10:41
@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.34%. Comparing base (2cb36c2) to head (08e97ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #617   +/-   ##
=======================================
  Coverage   85.34%   85.34%           
=======================================
  Files          38       38           
  Lines        3399     3399           
  Branches     3399     3399           
=======================================
  Hits         2901     2901           
  Misses        305      305           
  Partials      193      193           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexdewar alexdewar enabled auto-merge June 12, 2025 13:59
@alexdewar alexdewar merged commit 9456a6b into main Jun 12, 2025
7 checks passed
@alexdewar alexdewar deleted the tidy-ci-workflow branch June 12, 2025 13:59
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in MUSE Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants