-
Notifications
You must be signed in to change notification settings - Fork 382
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: scope the CI and add QoL improvements #3316
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks Summary🔴 The pull request head branch must be up-to-date with its base (more info) Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🔴 The pull request head branch must be up-to-date with its base (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
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.
The testdata
here should just be to test the integration system itself
I have another proposal here that was spinning around in my brain: I actually like that in gnovm
, we put the "integration tests" for the vm inside of tests
. What would you think of putting txtars in gno.land/tests/scripts (or txtar, testscript, ...)
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.
Don't think, as a consequence of my other comment, that this should be removed
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.
Can we add an .editorconfig
?
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.
though we'll probably need it again once we start publishing for mainnet.
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.
Manfred said we only care about this action for the event once every few years that legal remembers open source licenses exist and they ask us for an audit. I'm OK with this actually being enabled, but d we have an API key?
forbidigo: | ||
forbid: | ||
- p: '^regexp\.(Match|MatchString)$' | ||
msg: it will re-compile the regexp for each execution; compile the regexp with regexp.Compile and store it as a singleton |
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.
iirc the error message came out better written out (in context) as I wrote it
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.
cmd/gno/main.go:26:2: use of `regexp.MatchString` forbidden because "it will re-compile the regexp for each execution; compile the regexp with regexp.Compile and store it as a singleton" (forbidigo)
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.
shouldn't we test building it?
do we use it in any deployment?
@@ -1,9 +1,13 @@ | |||
name: examples | |||
name: Gno Examples CI Suite |
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.
Keep this one short; "CI suite" is redundant.
I like "Test Examples"
|
||
on: | ||
push: | ||
paths: | ||
branches: | ||
- master |
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.
lol
@@ -1,22 +1,27 @@ | |||
name: gnovm | |||
name: GnoVM CI Suite |
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.
Also redundant, same for all others
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.
These names matter because they show up as the names of the workflows; it's better if they're compact
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
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.
Left some comments. The most important ones are keeping go version in less config files as possible and keep dependabot tags as they were, because they will be easier to maintain (everything needed to create a new workflow is in only one config file, you don't need to change dependabot config)
groups: | ||
gno-land: | ||
paths: | ||
- "gno.land/**" | ||
flags: | ||
- gno-land | ||
gnovm: | ||
paths: | ||
- "gnovm/**" | ||
flags: | ||
- gnovm | ||
misc: | ||
paths: | ||
- "misc/**" | ||
flags: | ||
- misc | ||
tm2: | ||
paths: | ||
- "tm2/**" | ||
flags: | ||
- tm2 | ||
contribs: | ||
paths: | ||
- "contribs/**" | ||
flags: | ||
- contribs |
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.
Flags are already automatically defined here: https://github.com/gnolang/gno/pull/3316/files#diff-a8d8d916d02d13f09d2a0128a4667158fdd150a4e354d0c7a9cde6a8479b3dc5R68 so no need to define them here.
statuses: | ||
- type: project | ||
flag: gno-land | ||
target: auto | ||
threshold: 5 | ||
- type: project | ||
flag: gnovm | ||
target: auto | ||
threshold: 2 # Stricter threshold | ||
- type: project | ||
flag: misc | ||
target: auto | ||
threshold: 10 | ||
- type: project | ||
flag: tm2 | ||
target: auto | ||
threshold: 5 | ||
- type: project | ||
flag: contribs | ||
target: auto | ||
threshold: 5 |
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.
why do we want to change thresholds depending on the flag? Is it really necessary?
@@ -9,6 +9,7 @@ on: | |||
- gno.land/** | |||
- gnovm/** | |||
- tm2/** | |||
- '**/*.go' |
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.
This is making previous filters unnecessary.
name: Run Main | ||
uses: ./.github/workflows/main_template.yml | ||
with: | ||
modulepath: contribs/${{ matrix.program }} | ||
go-version: "1.22.x" |
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.
moving go version outside the main template is making it scattered around more than before...
go-version: | ||
description: "Go version to use" | ||
required: true | ||
type: string |
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 prefer to keep all references to go version inside only one file: this one.
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.
Description
This PR modifies the monorepo workflows, and introduces QoL improvements to the overall CI.
The PR is not meant to be a cover-all fix for the CI, but a start on how we can begin improving it.
@gfanton We should start looking into how to group txtars soon 🙏