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

ci: use go.mod to determine go version #3279

Merged
merged 2 commits into from
Dec 7, 2024

Conversation

aeddi
Copy link
Contributor

@aeddi aeddi commented Dec 5, 2024

Related to #3229 (comment)

This PR replaces most fixed versions of Go in the CI workflows with retrieving the version from the relevant go.mod file.

For workflows that do not have an associated go.mod file, the go.mod file at the root of the repository is used. All *_template.yml workflows seem designed to use a fixed version of go and do not allow passing a go.mod file to the setup-go action. Achieving this would require a more significant refactor.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

@aeddi aeddi requested a review from thehowl December 5, 2024 17:53
@Gno2D2
Copy link
Collaborator

Gno2D2 commented Dec 5, 2024

I'm a bot that assists the Gno Core team in maintaining this repository. My role is to ensure that contributors understand and follow our guidelines, helping to streamline the development process.

The following requirements must be fulfilled before a pull request can be merged.
Some requirement checks are automated and can be verified by the CI, while others need manual verification by a staff member.

These requirements are defined in this configuration file.

Automated Checks

🟢 Maintainers must be able to edit this pull request (more info)
🟢 The pull request head branch must be up-to-date with its base (more info)

Manual Checks

  • Determine if infra needs to be updated before merging
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 On every pull request

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

The pull request head branch must be up-to-date with its base (more info)

If

🟢 Condition met
└── 🟢 On every pull request

Then

🟢 Requirement satisfied
└── 🟢 Head branch (aeddi:dev/aeddi/ci-go-version-file) is up to date with base (master): behind by 0 / ahead by 2

Manual Checks
Determine if infra needs to be updated before merging

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: master
    └── 🟢 Or
        ├── 🔴 A changed file matches this pattern: Dockerfile
        ├── 🔴 A changed file matches this pattern: ^misc/deployments
        ├── 🔴 A changed file matches this pattern: ^misc/docker-
        ├── 🟢 A changed file matches this pattern: ^.github/workflows/releaser.*\.yml$ (filename: .github/workflows/releaser-master.yml)
        └── 🔴 A changed file matches this pattern: ^.github/workflows/portal-loop\.yml$

Can be checked by

  • team devops

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

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

One go.mod to rule them all, one go.mod to find them.
One go.mod to bring them all, and in the cloud compile them.

@Kouteki Kouteki added the in focus Core team is prioritizing this work label Dec 6, 2024
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Noice

@thehowl thehowl changed the title chore: use go.mod to get go version in CI jobs ci: use go.mod to determine go version Dec 7, 2024
@thehowl thehowl merged commit ca1df86 into gnolang:master Dec 7, 2024
105 of 106 checks passed
omarsy pushed a commit to TERITORI/gno that referenced this pull request Dec 7, 2024
Related to
gnolang#3229 (comment)

This PR replaces most fixed versions of Go in the CI workflows with
retrieving the version from the relevant go.mod file.

For workflows that do not have an associated go.mod file, the go.mod
file at the root of the repository is used. All `*_template.yml`
workflows seem designed to use a fixed version of go and do not allow
passing a go.mod file to the `setup-go` action. Achieving this would
require a more significant refactor.

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
</details>

Co-authored-by: Morgan <[email protected]>
Villaquiranm pushed a commit to Villaquiranm/gno that referenced this pull request Dec 9, 2024
Related to
gnolang#3229 (comment)

This PR replaces most fixed versions of Go in the CI workflows with
retrieving the version from the relevant go.mod file.

For workflows that do not have an associated go.mod file, the go.mod
file at the root of the repository is used. All `*_template.yml`
workflows seem designed to use a fixed version of go and do not allow
passing a go.mod file to the `setup-go` action. Achieving this would
require a more significant refactor.

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
</details>

Co-authored-by: Morgan <[email protected]>
r3v4s pushed a commit to gnoswap-labs/gno that referenced this pull request Dec 10, 2024
Related to
gnolang#3229 (comment)

This PR replaces most fixed versions of Go in the CI workflows with
retrieving the version from the relevant go.mod file.

For workflows that do not have an associated go.mod file, the go.mod
file at the root of the repository is used. All `*_template.yml`
workflows seem designed to use a fixed version of go and do not allow
passing a go.mod file to the `setup-go` action. Achieving this would
require a more significant refactor.

<details><summary>Contributors' checklist...</summary>

- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
</details>

Co-authored-by: Morgan <[email protected]>
@Kouteki Kouteki removed the in focus Core team is prioritizing this work label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

5 participants