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

GitHub actions for testing #49

Merged
merged 24 commits into from Jul 17, 2020
Merged

GitHub actions for testing #49

merged 24 commits into from Jul 17, 2020

Conversation

darabos
Copy link
Contributor

@darabos darabos commented Jul 9, 2020

For #8. It's hard to test this locally. I'm using https://github.com/nektos/act but I'm getting weird errors and caching doesn't work, so each attempt takes ages. Will this PR trigger a run, I wonder? If not, I may merge this and try to see if I can trigger it that way.

@darabos
Copy link
Contributor Author

darabos commented Jul 9, 2020

Will this PR trigger a run, I wonder?

Looks that way! I can see this PR on the Actions page!

@darabos
Copy link
Contributor Author

darabos commented Jul 9, 2020

It dies with the same weird error:

[error] /github/workspace/app/Global.scala:56: object io is not a member of package org.apache.commons
[error]           org.apache.commons.io.FileUtils.writeStringToFile(
[error]                              ^
[error] /github/workspace/app/com/lynxanalytics/biggraph/BigGraphEnvironment.scala:13: type SparkSession is not a member of package org.apache.spark.sql
[error]   def createSparkSession: spark.sql.SparkSession

But it goes quite fast, just 14 minutes. Looks like maybe the Spark import does not work out.

@xandrew
Copy link
Contributor

xandrew commented Jul 10, 2020

Thanks, promising! Shall I review or wait until you got to the bottom of the compile issue?

@darabos
Copy link
Contributor Author

darabos commented Jul 10, 2020

Thanks, promising! Shall I review or wait until you got to the bottom of the compile issue?

Thanks! Yeah, don't review it yet.

@darabos darabos changed the title Try to set up GitHub actions for testing [WIP] Try to set up GitHub actions for testing Jul 10, 2020
@darabos
Copy link
Contributor Author

darabos commented Jul 10, 2020

Now it's actually running our tests! Most of them even pass. I've seen a failure that I cannot reproduce locally though:

[info] - Derive graph attribute *** FAILED ***
[info]   java.nio.charset.MalformedInputException: Input length = 1
[info]   at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
[info]   at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
[info]   at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
[info]   at java.io.InputStreamReader.read(InputStreamReader.java:184)
[info]   at java.io.BufferedReader.fill(BufferedReader.java:161)
[info]   at java.io.BufferedReader.readLine(BufferedReader.java:324)
[info]   at java.io.BufferedReader.readLine(BufferedReader.java:389)
[info]   at scala.io.BufferedSource$BufferedLineIterator.hasNext(BufferedSource.scala:72)
[info]   at scala.collection.Iterator$class.foreach(Iterator.scala:893)
[info]   at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
[info]   ...

@darabos
Copy link
Contributor Author

darabos commented Jul 10, 2020

[error] Error: Total 690, Failed 13, Errors 2, Passed 675, Ignored 4
[error] Failed tests:
[error] 	com.lynxanalytics.biggraph.frontend_operations.ComputeInPythonTest
[error] 	com.lynxanalytics.biggraph.graph_operations.GCNTest
[error] 	com.lynxanalytics.biggraph.frontend_operations.DeriveGraphAttributeTest
[error] 	com.lynxanalytics.biggraph.graph_operations.DeriveScalaTest
[error] 	com.lynxanalytics.biggraph.frontend_operations.EmbedVerticesTest
[error] 	com.lynxanalytics.biggraph.frontend_operations.SQLTest
[error] 	com.lynxanalytics.biggraph.frontend_operations.CreateGraphInPythonTest
[error] Error during tests:
[error] 	com.lynxanalytics.biggraph.frontend_operations.ImportNeo4jTest
[error] 	com.lynxanalytics.biggraph.graph_util.Neo4jUtilTest
[error] (test:testOnly) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 1511 s, completed Jul 10, 2020 1:11:51 PM

@darabos
Copy link
Contributor Author

darabos commented Jul 14, 2020

The backend test passes now!

image

I'm not sure what the frontend test is doing. If I click on it to see the logs, nothing happens. Surely it will time out or something eventually...

@darabos darabos changed the title [WIP] Try to set up GitHub actions for testing GitHub actions for testing Jul 16, 2020
@darabos
Copy link
Contributor Author

darabos commented Jul 17, 2020

image

Hallelujah! 🎉

I'm sure we can improve them but it's a start!

  • They are a bit slow. I'm not sure the caching is working right. It's a shame that the Docker image gets rebuilt all the time.
  • They are not very reliable. When SBT downloads the dependencies (e.g. SBT itself), I've seen multiple cases of timeouts. If the cache worked that would help with this too.

But I think we can merge it for now!

Copy link
Contributor

@xandrew xandrew left a comment

Choose a reason for hiding this comment

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

Can't say I thoroughly understood all details, but looks good in general! Cool that we have a working CI now! :)

@@ -1,13 +1,17 @@
#!/bin/bash -xue
# Install PyTorch Geometric.
Copy link
Contributor

Choose a reason for hiding this comment

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

Pytorch is our only dependency? Maybe worth renaming this file? I mean, someone might innocently add something at the end and get surprised by it not working, due to the if at the start. Or maybe reverse the if. and put the torch related pip installs inside? Btw, why the if? Doesn't pip handle this anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pytorch is our only dependency? Maybe worth renaming this file? I mean, someone might innocently add something at the end and get surprised by it not working, due to the if at the start. Or maybe reverse the if. and put the torch related pip installs inside? Btw, why the if? Doesn't pip handle this anyways?

Without the if it takes 40 seconds to do nothing. We could probably use Pipenv or some magic to handle this better, but I'm just happy it works at all. 😅

I've reversed the if, thanks for the suggestion!

@darabos darabos merged commit 8d96d7e into master Jul 17, 2020
@darabos darabos deleted the darabos-github-actions branch July 17, 2020 14:43
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.

None yet

2 participants