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

Update Github workflows to run unit tests #1

Merged
merged 1 commit into from
Aug 9, 2021
Merged

Conversation

pvaneck
Copy link
Member

@pvaneck pvaneck commented Aug 6, 2021

  • There is a unit test workflow for gating pull requests.
  • Then there is also a workflow that, on each push, runs tests then builds/pushes to docker hub if the tests pass.
  • The command was removed from the ModelMeshTearDown test because the test would fail with no such file or directory for command.

Note, tests are not run from the docker build command because of the -DskipTests=true in the mvn command in the Dockerfile. Removing the skipTests flag and running the tests during the image build always fails in the GitHub Actions environment after the tests complete due to connection time outs.

Ex:

[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 49, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ model-mesh ---
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/maven-archiver/3.4.0/maven-archiver-3.4.0.pom
[INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection timed out (Read failed)
[INFO] Retrying request to {s}->https://repo.maven.apache.org:443
[INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://repo.maven.apache.org:443: Connection timed out (Read failed)
[INFO] Retrying request to {s}->https://repo.maven.apache.org:443

I have been unable to figure out why exactly this happens, but it might possibly be due to the amount of time the tests take or some other side effect? Skipping the tests doesn't see this timeout issue.

There is a unit test workflow for gating pull requests.
Then there is also a workflow that runs tests then builds/pushes to
docker if the tests pass.
@@ -1,37 +1,44 @@
name: Build and Push

on:
pull_request:
push:
branches: [ main ]

Choose a reason for hiding this comment

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

Should we include pull request merge to trigger this workflow? Not sure it is covered by push.

Copy link

@chinhuang007 chinhuang007 left a comment

Choose a reason for hiding this comment

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

LGTM!

@chinhuang007 chinhuang007 merged commit 079073f into main Aug 9, 2021
@pvaneck pvaneck deleted the update-workflow branch September 15, 2021 21:32
ruivieira pushed a commit to ruivieira/modelmesh that referenced this pull request Mar 2, 2023
Upstream Sync November 8th 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants