-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
483a655
to
50e2d12
Compare
There was a problem hiding this 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?
You're totally right. I'm adding a README xD |
c5ff159
to
d06ff82
Compare
Co-authored-by: Christian <sigilioso@gmail.com>
ae0f6f8
to
95caf40
Compare
95caf40
to
d2865a6
Compare
Cargo.toml
Outdated
missing_docs = "warn" | ||
|
||
[lints.clippy] | ||
missing_docs_in_private_items = "warn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: missing newline
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome work!
.github/workflows/tests.yml
Outdated
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@1.85.0 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
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 runningcargo deny --all-features --manifest-path ./Cargo.toml list -l crate -f json
inside the root directory of thenewrelic-oauth-client-rs
repository, at a certain revision. The tooling versions used are:cargo
1.85.0cargo-deny
0.16.3expected_third_party_notices_file.md
is a third party notices file, as generated from the previous JSON contents passed throughrust-licenses-noticer
in a known previous state. Specifically, before the crate was moved to this repository, with the template tailored tonewrelic-oauth-client-rs
.Any change on
rust-licenses-noticer
that breaks how the notices file is generated will be caught here.