Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup, action, characterization testing #1

Merged
merged 14 commits into from
Mar 5, 2025

Conversation

DavSanchez
Copy link
Contributor

@DavSanchez DavSanchez commented Feb 27, 2025

This PR includes much more content than I planned initially, but will leave the repo in an acceptable "first state" for use.

Repo structure

Adds a README.md and the usual contents of NR Open Source repos.

GitHub Actions

This repo becomes usable as a GitHub Action, for consumption in our intended repositories.

Characterization testing

The contents of the golden test crate help to make sure no modification of this crate break how this template is generated.

There are two files in the fixtures directory:

  • cargo_deny_output.json represents the output of running cargo deny --all-features --manifest-path ./Cargo.toml list -l crate -f json inside the root directory of the newrelic-oauth-client-rs repository, at a certain revision. The tooling versions used are:
    • cargo 1.85.0
    • cargo-deny 0.16.3
  • expected_third_party_notices_file.md is a third party notices file, as generated from the previous JSON contents passed through rust-licenses-noticer in a known previous state. Specifically, before the crate was moved to this repository, with the template tailored to newrelic-oauth-client-rs.

Any change on rust-licenses-noticer that breaks how the notices file is generated will be caught here.

@DavSanchez DavSanchez requested a review from a team February 27, 2025 17:26
@DavSanchez DavSanchez changed the title ci: characterization testing test: characterization testing Feb 27, 2025
Copy link
Contributor

@sigilioso sigilioso left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Should we add some lines about the usage in the README file?

@sigilioso sigilioso requested a review from a team February 28, 2025 12:49
@DavSanchez
Copy link
Contributor Author

Thanks for this!

Should we add some lines about the usage in the README file?

You're totally right. I'm adding a README xD

@DavSanchez DavSanchez changed the title test: characterization testing feat: setup, action, characterization testing Feb 28, 2025
@DavSanchez DavSanchez force-pushed the refactor/review-code branch 2 times, most recently from ae0f6f8 to 95caf40 Compare February 28, 2025 21:27
@DavSanchez DavSanchez requested review from sigilioso, danielorihuela and a team March 5, 2025 13:19
Cargo.toml Outdated
missing_docs = "warn"

[lints.clippy]
missing_docs_in_private_items = "warn"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: missing newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 947f845!

README.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, let's check if this should follow this template

Copy link

@gsanchezgavier gsanchezgavier left a comment

Choose a reason for hiding this comment

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

awesome work!

with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@1.85.0

Choose a reason for hiding this comment

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

would make sense to pin latest stable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it does. Changed in 9401fce!

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: ⚖️ Third party licenses

Choose a reason for hiding this comment

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

Could you describe in the name what is the worklfow doing? i was expecting one of them testing the action itself like self test with some asserts that, kind of a action integration test

}

#[test]
fn golden() {

Choose a reason for hiding this comment

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

here is the test i mentioned in the previous comment :) , so perhaps run it on the workflows by using the action too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! This is implemented in the second PR: #2

I can merge it into this one, but I wanted to keep it separate because it rewrote the code from its previous state in AC, so it was easier to review.

Copy link
Contributor

@sigilioso sigilioso left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@DavSanchez DavSanchez merged commit bb955dc into main Mar 5, 2025
6 checks passed
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.

4 participants