Skip to content

Feat: Add Github Action For Unit Tests#59

Open
officialfrancismendoza wants to merge 6 commits into
bcgit:release/0.1.2alphafrom
officialfrancismendoza:feature/officialfrancismendoza/45-github-action-unit-tests
Open

Feat: Add Github Action For Unit Tests#59
officialfrancismendoza wants to merge 6 commits into
bcgit:release/0.1.2alphafrom
officialfrancismendoza:feature/officialfrancismendoza/45-github-action-unit-tests

Conversation

@officialfrancismendoza

Copy link
Copy Markdown
Contributor

Github action to handle (#45) that does the following:

  • Check formatting
cargo fmt --all -- --check
  • Run Clippy
cargo clippy --workspace --all-targets --all-features
  • Build workspace
cargo build --workspace --all-targets --all-features
  • Run unit tests (original request)
cargo test --all

@officialfrancismendoza officialfrancismendoza changed the title Add Github Action For Unit Tests Feat: Add Github Action For Unit Tests Jul 15, 2026
@officialfrancismendoza
officialfrancismendoza marked this pull request as ready for review July 15, 2026 13:56
@ounsworth

ounsworth commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This is definitely going in the right direction, but I have a few comments.

I think it's better to have many small actions that tell you one specific thing that's wrong with your PR rather than a mega action that could fail for many reasons and you have to go digging in logs every time.

For example, cargo fmt --all -- --check is already covered by @npajkovsky 's:

https://github.com/bcgit/bc-rust/blob/release/0.1.2alpha/.github/workflows/rust-style.yml

Similarly, I would split out cargo clippy into a separate action. Also, cargo clippy is currently throwing hundreds of errors and warnings, so I think we first need a github issue to get the codebase to a clean state before we can start complaining about this on PRs.

Comment thread .github/workflows/ci.yml Outdated

pull_request:
branches:
- release/0.1.2alpha

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This probably wants to be release/* so that we don't have to manually bump it for each release.

We could also have a chat about whether we want this to run on all PRs or just the ones targeting a release branch? We're not paying for github server usage (and this action is pretty light anyway), so I don't see a reason to restrict it. That would be:

on:
  pull_request:

In this case, I'm not sure that the on: push: trigger is doing anything different from the pull_rquest: trigger? I could be wrong, but I think it would behave the same if you removed that?

@officialfrancismendoza

Copy link
Copy Markdown
Contributor Author

This is definitely going in the right direction, but I have a few comments.

I think it's better to have many small actions that tell you one specific thing that's wrong with your PR rather than a mega action that could fail for many reasons and you have to go digging in logs every time.

For example, cargo fmt --all -- --check is already covered by @npajkovsky 's:

https://github.com/bcgit/bc-rust/blob/release/0.1.2alpha/.github/workflows/rust-style.yml

Similarly, I would split out cargo clippy into a separate action. Also, cargo clippy is currently throwing hundreds of errors and warnings, so I think we first need a github issue to get the codebase to a clean state before we can start complaining about this on PRs.

@ounsworth ACK. Will split into several smaller Github actions and branches wildcarded into release/*

@ounsworth

Copy link
Copy Markdown
Contributor

Can you also make a docsLlint action that runs

cargo doc --all

?

@ounsworth

Copy link
Copy Markdown
Contributor

It would also be cool to put the github CI badges on the main readme.

@hubot
hubot force-pushed the release/0.1.2alpha branch from 29dadd5 to 7120e4a Compare July 16, 2026 01:47
@officialfrancismendoza
officialfrancismendoza force-pushed the feature/officialfrancismendoza/45-github-action-unit-tests branch from 8d0dfd5 to 43bc846 Compare July 16, 2026 20:21
@officialfrancismendoza

officialfrancismendoza commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

@ounsworth rebased off of bcgit release/0.1.3alpha, added in badges into the README.md, and split up CI actions into different yml files

Note about rustfmt failing: I verified that the rustfmt failures are in files not modified by this PR and are already present on release/0.1.3alpha. Since cargo fmt --all -- --check checks the entire workspace, the existing formatting debt causes this PR to fail despite not introducing those changes.

Repository-wide formatting cleanup should be handled separately, not in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants