-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add integration test that starts blender example in goth #281
Conversation
e1cd13f
to
475ab70
Compare
tests/goth/assets/goth-config.yml
Outdated
@@ -0,0 +1,62 @@ | |||
# Note: values of keys denoting paths are resolved relative to the directory | |||
# in which this file is located. | |||
# The tokens `~` and `~user` are also replaced by the corresponding users's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# The tokens `~` and `~user` are also replaced by the corresponding users's | |
# The tokens `~` and `~user` are also replaced by user's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is now (as of f16cc5a) generated by goth
in a separate workflow step.
556cb07
to
c03d5bb
Compare
3efba97
to
22a121b
Compare
0257794
to
3a222c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left some minor comments. I am somewhat worried about the maintainability of goth
assets, but that's a separate discussion.
# - <your-branch> # put your branch name here to test it @ GH Actions | ||
pull_request: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow tests.yml
includes release branches (i.e. - b0.*
) on pushes and pull requests. Perhaps they should be added here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added them in 0d80b77
- "8545:8545" | ||
|
||
zksync: | ||
image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:7a25ed913d4a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:7a25ed913d4a | |
image: docker.pkg.github.com/golemfactory/yagna-zksync/yagna-zksync-mock:f6d0cf02f6bc |
I just realised updating these image hashes is going to be troublesome once tests are split out into project repos. :x
tests/goth/assets/goth-config.yml
Outdated
class: "goth.runner.probe.RequestorProbe" | ||
|
||
- name: "VM-Wasm-Provider" | ||
class: "goth.runner.provider.ProviderProbeWithLogSteps" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class: "goth.runner.provider.ProviderProbeWithLogSteps" | |
class: "goth.runner.provider.ProviderProbe" |
Once golemfactory/goth#454 is merged. I'm getting more and more skeptical about having these assets duplicated across repos. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've removed the asset files from the repository and instead added a command that creates them every time the tests are run -- see f16cc5a
# - <your-branch> # put your branch name here to test it @ GH Actions | ||
pull_request: | ||
branches: | ||
- master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"On pull request" action for yajsapi
unit tests looks like this:
- master | |
- master | |
- b0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added in 0d80b77
@@ -37,10 +37,11 @@ toml = "^0.10.1" | |||
srvresolver = "^0.3.5" | |||
colorama = "^0.4.4" | |||
|
|||
goth = {git = "https://github.com/golemfactory/goth.git", branch = "master", optional = true, python = "^3.8.0"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that there should be a comment explaining why goth
was added as an optional dependency, not a dev dependency.
I couldn't make it work with goth as dev-dependency, as goth requires Python >= 3.8, which conflicts with Python >= 3.6 for the whole project. So goth is now installed with optional = "true" and python = "^3.8.0".
Perhaps it can be moved to dev-dependencies (it would be an optional dev-dependency then, I'm not sure if that would work though).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a comment added in 0d80b77
poetry install -E integration-tests | ||
|
||
- name: Log in to GitHub Docker repository | ||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${{github.actor}} --password-stdin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this log-in given that goth
repo is now public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need this for two reasons:
- Pointing the Docker daemon to GitHub's package registry (by default it only uses hub.docker.com).
- Basic authentication, I believe this is similar to using GitHub's REST API, i.e. you still need to provide a personal token even when accessing public endpoints, presumably to handle stuff like rate limiting.
@@ -1,6 +1,6 @@ | |||
[build-system] | |||
requires = ["poetry"] | |||
build-backend = "poetry.masonry.api" | |||
requires = ["poetry_core>=1.0.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azawlocki just out of curiosity - where do thse changes come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the remarks in https://python-poetry.org/docs/pyproject/#poetry-and-pep-517 (I was reading that file looking for a way to add goth
as an extra/optional dependency).
|
||
[tool.poetry.extras] | ||
cli = ['fire', 'rich'] | ||
|
||
integration-tests = ['goth', 'pytest', 'pytest-asyncio'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: filipgolem <44880692+filipgolem@users.noreply.github.com> Co-authored-by: Kuba Mazurek <jakub.mazurek@golem.network>
ca8531d
to
dbe0f95
Compare
This PR adds a test case that runs our default blender example (
examples/blender/blender.py
) in a 2-provider test network started bygoth
.The test serves mainly as a sanity check and an illustrative example of how to create more test cases using
goth
.To run the test case on your local machine, do this in the root directory of the
yapapi
project:Few basic properties are checked by monitoring output of the requestor script:
ERROR