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

Use Github Actions for unit and integration tests #8968

Merged
merged 6 commits into from
Apr 1, 2022

Conversation

lenaschoenburg
Copy link
Member

@lenaschoenburg lenaschoenburg commented Mar 23, 2022

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows:

  • Tests
  • Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

Tests

Includes the OS support smoke tests, integration tests, and unit tests. Tests are trigger for all pull requests and the staging and trying branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

Code Quality

Includes go-lint, CodeQL and java-formatting.

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

@lenaschoenburg lenaschoenburg force-pushed the gha-unit-tests branch 3 times, most recently from fc32d4c to 7bd2953 Compare March 24, 2022 12:25
@lenaschoenburg
Copy link
Member Author

I can't quite get the unit tests to work, no matter how I choose to run them. It's always RaftFailOverTest.shouldReplicateSnapshotWithManyFilesOnJoin that fails 🤔

@lenaschoenburg lenaschoenburg force-pushed the gha-unit-tests branch 6 times, most recently from 620e7a5 to 46f7146 Compare March 28, 2022 15:43
Copy link
Contributor

@remcowesterhoud remcowesterhoud left a comment

Choose a reason for hiding this comment

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

Nice work @oleschoenburg! 🚀 Can't wait to have everything on GHA 😄

I have placed some questions and suggestions.

🔧 You mentioned during the team meeting that all only needed to archive the test results, since any tool would not give the full output anyways. I don't fully agree with this sentiment. I'm sure you've looked at the publish unit test result action. As you said it unfortunately does not provide all the logging. It does however, provide a quick overview which tests were the ones that are failing. This would at least give some pointers on where to look in the test reports.

For an example what it'd look like you could refer to: https://github.com/camunda/zeebe-process-test/runs/5770932644
Bonus: it could also add a comment with the results on your PR: camunda/zeebe-process-test#281

❌ You CodeQL seems to be failing. I don't see any change you made that would've caused this. Please take a look at it and judge if it's something you should fix.

.github/workflows/code-quality.yml Outdated Show resolved Hide resolved
.github/workflows/code-quality.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
lenaschoenburg and others added 3 commits March 31, 2022 15:00
windows-latest now points to windows-2022

Co-authored-by: Remco <remco@westerhoud.nl>
@lenaschoenburg
Copy link
Member Author

I'm sure you've looked at the publish unit test result action

That's one that I actually haven't tried yet. I can try to add it here, let's see if this one manages to not run OOM 😄. I just noticed that it also supports matrix builds, which is awesome! https://github.com/EnricoMi/publish-unit-test-result-action#use-with-matrix-strategy

You CodeQL seems to be failing

Yeah, not sure what's up with that. I think I've seen it once or twice before, I'd just ignore it for now and assume that it's fixed after merging.

@remcowesterhoud
Copy link
Contributor

It does support matrix, it is a little bit weird how it does it though. I've added it to ZPT so if you need help here let me know!

@camunda camunda deleted a comment from github-actions bot Mar 31, 2022
@lenaschoenburg
Copy link
Member Author

Thanks for the review so far @remcowesterhoud 🙇
I believe I've addressed all you suggestions so far, please take another look.

Copy link
Contributor

@remcowesterhoud remcowesterhoud left a comment

Choose a reason for hiding this comment

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

Awesome LGTM @oleschoenburg! 🏆

Will you create an issue for the test result publishing as well?

@lenaschoenburg
Copy link
Member Author

bors r+

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 31, 2022
8968: Use Github Actions for unit and integration tests r=oleschoenburg a=oleschoenburg

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows: 
* Tests
* Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

## Tests
Includes the **OS support smoke tests**, **integration tests**, and **unit tests**.  Tests are trigger for all pull requests and the `staging` and `trying` branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

## Code Quality

Includes **go-lint**, **CodeQL** and **java-formatting**. 

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@lenaschoenburg
Copy link
Member Author

bors retry

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 31, 2022
8968: Use Github Actions for unit and integration tests r=oleschoenburg a=oleschoenburg

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows: 
* Tests
* Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

## Tests
Includes the **OS support smoke tests**, **integration tests**, and **unit tests**.  Tests are trigger for all pull requests and the `staging` and `trying` branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

## Code Quality

Includes **go-lint**, **CodeQL** and **java-formatting**. 

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@lenaschoenburg
Copy link
Member Author

bors retry

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 31, 2022
8968: Use Github Actions for unit and integration tests r=oleschoenburg a=oleschoenburg

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows: 
* Tests
* Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

## Tests
Includes the **OS support smoke tests**, **integration tests**, and **unit tests**.  Tests are trigger for all pull requests and the `staging` and `trying` branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

## Code Quality

Includes **go-lint**, **CodeQL** and **java-formatting**. 

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@lenaschoenburg
Copy link
Member Author

Oh the irony 🤣

bors retry

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 31, 2022
8968: Use Github Actions for unit and integration tests r=oleschoenburg a=oleschoenburg

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows: 
* Tests
* Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

## Tests
Includes the **OS support smoke tests**, **integration tests**, and **unit tests**.  Tests are trigger for all pull requests and the `staging` and `trying` branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

## Code Quality

Includes **go-lint**, **CodeQL** and **java-formatting**. 

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Timed out.

@lenaschoenburg
Copy link
Member Author

bors retry

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 31, 2022
8968: Use Github Actions for unit and integration tests r=oleschoenburg a=oleschoenburg

This is a refactoring and enhancement of our existing GitHub Actions workflows.

With the changes here, we will have two workflows: 
* Tests
* Code Quality

They are not yet integrated with bors, meaning that they don't block merging if they fail and Jenkins is still the source of truth.

## Tests
Includes the **OS support smoke tests**, **integration tests**, and **unit tests**.  Tests are trigger for all pull requests and the `staging` and `trying` branches to support integration with bors in the future.

Integration tests are run on a self-hosted runner. The elasticsearch exporter tests are run separately without flaky test detection on a smaller self-hosted runner.

Most unit tests run in parallel on GitHub's hosted runners, except for the engine and logstream tests which are a bit too heavy and are run on a small self-hosted runner.

## Code Quality

Includes **go-lint**, **CodeQL** and **java-formatting**. 

This PR makes no substantial changes to the go-lint and CodeQL jobs but adds another job to ensure that java code is properly formatted. In the future we could even add additional steps to the java formatting job to automatically suggest formatting changes in PRs.

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@Zelldon
Copy link
Member

Zelldon commented Mar 31, 2022

😆 Just merge :D

@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@lenaschoenburg lenaschoenburg merged commit 5131e51 into main Apr 1, 2022
@lenaschoenburg lenaschoenburg deleted the gha-unit-tests branch April 1, 2022 06:59
remcowesterhoud added a commit that referenced this pull request Apr 1, 2022
In #8968 we have decided to upgrade from windows-2022 to windows-latest in our smoke-tests. In this change we forgot to update the the name in bors, causing bors to get stuck waiting for a check named "Smoke tests on windows-2022" to complete.
@lenaschoenburg lenaschoenburg mentioned this pull request Apr 13, 2022
19 tasks
@deepthidevaki deepthidevaki added the version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 label May 3, 2022
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants