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 tests for 32bit correction + version of Go update #526

Merged
merged 7 commits into from
Jun 6, 2024

Conversation

matteosz
Copy link
Contributor

@matteosz matteosz commented May 24, 2024

It addresses @ineiti's comments of using a matrix to simplify the ci.

Resolves #522

@matteosz matteosz changed the base branch from master to drandmerge May 24, 2024 09:08
Copy link

🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.

1 similar comment
Copy link

🔒 Could not start CI tests due to missing safe PR label. Please contact a DEDIS maintainer.

@matteosz matteosz self-assigned this May 24, 2024
@matteosz matteosz marked this pull request as draft May 24, 2024 09:19
@matteosz matteosz marked this pull request as ready for review May 24, 2024 10:13
Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

Some small changes. And here is how you can have different golang versions in Alpine:

https://github.com/ineiti/test_ubuntu_32bits/blob/main/.github/workflows/test.yaml

TLDR: download the go-binary from the official website and add it to the PATH.

.github/workflows/test_on_pr.yml Outdated Show resolved Hide resolved
.github/workflows/test_on_pr.yml Outdated Show resolved Hide resolved
.github/workflows/test_on_pr.yml Outdated Show resolved Hide resolved
.github/workflows/test_on_push.yml Outdated Show resolved Hide resolved
.github/workflows/test_on_push.yml Outdated Show resolved Hide resolved
.github/workflows/test_on_push.yml Outdated Show resolved Hide resolved
@ineiti
Copy link
Member

ineiti commented May 24, 2024

What is your reasoning behind testing go 1.18 and 1.22?

In some past projects we had a policy of "the last two stable versions". You might fail on go 1.19, 1.20, or 1.21 with your policy.

@matteosz matteosz requested a review from ineiti May 24, 2024 14:01
Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

  • The matrix in test_on_pr still has go 1.18 in it
  • why is there a test_on_pr and a test_on_push with similar tests in it? This leads to errors, like you can see yourself: one has the correct golang-version matrix, the other doesn't. One still has the debug output in the Setup Alpine Linux, the other doesn't.
    I propose to remove the test_on_push - if I read correctly, only the Send coverage is unique to it. Either include it in the test_on_pr, or add an if to it.

run: make test
if: ${{ matrix.size == '32b' }}
run: |
GOVERSION=${{ matrix.golang == '1.21' && '1.21.10' || '1.22.3' }}
Copy link
Member

Choose a reason for hiding this comment

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

Please put 1.21.10 and 1.22.3 in the matrix, so you don't have to test here. This will most probably be overlooked the day somebody will adjust the versions in the matrix above, and then things will start to fail.

Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

Perfect - I think you could remove the matrix from the permission job for a more-than-perfect CI/CD :)

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@matteosz matteosz linked an issue Jun 4, 2024 that may be closed by this pull request
Comment on lines 10 to 12
concurrency:
group: ci-${{ github.ref }}-test
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove this early cancellation of already running tests when a new commit is pushed in quick succession on a PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice spot, it was an unwanted removal indeed

Copy link
Member

Choose a reason for hiding this comment

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

We're entering Nirvana territory :)

Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
37.7% Duplication on New Code (required ≤ 10%)

See analysis details on SonarCloud

@AnomalRoil AnomalRoil merged commit 109f9e6 into drandmerge Jun 6, 2024
9 checks passed
@AnomalRoil AnomalRoil deleted the ci-32bit-update branch June 6, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use specific go versions in workflows and go.mo
4 participants