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

build(ci): Basic Gradle workflow to build on Github #5134

Closed
wants to merge 12 commits into from

Conversation

skaldarnar
Copy link
Member

@skaldarnar skaldarnar commented Sep 3, 2023

Contains

A Github workflow to build, test, and analyze the code.

Uses Gradle Build Scans for reporting, see https://docs.gradle.com/enterprise/gradle-plugin/#connecting_to_scans_gradle_com (automatically accepted for CI runs, but no for local runs).

How to test

  • ensure that gradlew distForLauncher --scan still prompts for user agreement
  • ensure that the jobs look reasonable and work correctly (for instance, ❌ when build should be failing)
    Currently the integration-test step is failing with varying test cases, while they are working on Jenkins…

Additional Tasks

  • configure mandatory checks to use Github jobs instead of Jenkins jobs for now

@github-actions github-actions bot added the Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. label Sep 3, 2023
Copy link
Member

@jdrueckert jdrueckert left a comment

Choose a reason for hiding this comment

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

further extracting jobs (if desired) can be done as a follow-up

Comment on lines +21 to +24
- name: Unit Tests
run: ./gradlew unitTest
- name: API Documentation
run: ./gradlew javadoc
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to extract those into dedicated jobs, too?

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, if we get the job dependencies with reuse going then yes, otherwise I would not blow up the job count as this job with multiple steps is still faster than the other two…

Comment on lines +55 to +56
- name: Static Code Analysis
run: ./gradlew check -x test
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to split into mandatory (checkstyle) and not mandatory (spotbugs, pmd) ones here?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could - depends a bit on what we want to see in Github and/or how we view the build results.

Currently, we're more interested in the binary ❌ / ✔️ than anything else

.github/workflows/build.yml Outdated Show resolved Hide resolved
jdrueckert
jdrueckert previously approved these changes Sep 3, 2023
@skaldarnar
Copy link
Member Author

At least locally, the integration tests were successful with cf0d2ae

@skaldarnar
Copy link
Member Author

Hm, I have no clue about the failing tests 😔

In https://github.com/MovingBlocks/Terasology/actions/runs/6066596499/job/16457362691?pr=5134

 ExampleTest > testSendEvent() FAILED
    java.lang.RuntimeException at ExampleTest.java:65

170 tests completed, 1 failed, 10 skipped

In https://github.com/MovingBlocks/Terasology/actions/runs/6066441235/job/16457033053

 DelayManagerTest > delayedActionIsTriggeredTest(ModuleTestingHelper) FAILED
    java.lang.RuntimeException at DelayManagerTest.java:40

ExampleTest > testClientConnection() FAILED
    java.lang.RuntimeException at ExampleTest.java:42

170 tests completed, 2 failed, 10 skipped

In https://github.com/MovingBlocks/Terasology/actions/runs/6066440639/job/16457031736

 ExampleTest > testClientConnection() FAILED
    java.lang.RuntimeException at ExampleTest.java:42

ExampleTest > testSendEvent() FAILED
    java.lang.RuntimeException at ExampleTest.java:65

170 tests completed, 2 failed, 10 skipped

jdrueckert
jdrueckert previously approved these changes Sep 3, 2023
@jdrueckert
Copy link
Member

testSendEvent has been failing every now and then for a while now if you look at the past commits...

@skaldarnar
Copy link
Member Author

Jenkins is working at the moment, so I don't think we have a need to get this merged. Two different pipelines at the same time don't make much sense, thus, closing this PR.

@skaldarnar skaldarnar closed this Nov 8, 2023
@skaldarnar skaldarnar deleted the topic/github-workflow branch January 21, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants