-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Run python unit tests in a github actions #2589
Run python unit tests in a github actions #2589
Conversation
My preference would be to build the container in the github workflow and run tests from there. I'm not it's really a valid "test" if the pip dependencies could be entirely different versions. It's probably fine for the existing unit tests around parsing the config, but I wouldn't trust it otherwise. I do want to eventually build and publish the containers from github actions, so it would be a step in that direction. |
Agree, building a docker image and running tests there would represent it better. What do you think would be the path forward for this PR? |
What do you think about this? upd: actually added 3 platforms through buildx |
@blakeblackshear as a bare minimum I would like to get your review on unit test fixes if possible. I'm blocked in my other PR by that since I'm touching the same code base and want to make sure I'm not breaking anything. Those are in the |
I would build the container and then execute the tests inside it rather than adding the tests to the dockerbuild. I haven't had a chance to look at this in detail yet. |
Hi @blakeblackshear, I made a Makefile command to run the docker build, which executes the unit test at the end. If tests fail, the build will also fail. I managed to reuse the same Dockerfile for each platform by sed-ing them in place. this PR still contains the tox part to run tests on the local machine for folks like me. Do you think it makes sense to keep it or remove it? |
I don't plan to maintain it, so I worry it will get out of date. Are you not using vscode with remote containers for development? |
I'm not using remote containers. I'm developing my Jetson Nano using VS Code Remote SSH. It seems it's not possible to use dev containers and remote SSH at the same time. |
hi @blakeblackshear, do you have any plans of using |
I'm open to anything. Feel free to make a suggestion. I haven't invested heavily in writing tests as you can tell. |
@blakeblackshear I think I'm good. I just need your judgement on those changes to fix unit tests |
* tox tests initial commit * run tests in the Dockerfile during the build phase * remove local tests Co-authored-by: YS <ys@gm.com>
* tox tests initial commit * run tests in the Dockerfile during the build phase * remove local tests Co-authored-by: YS <ys@gm.com>
hi @blakeblackshear
This is an alternative way of running Python unit tests with Pytest, keeping the old way of doing unit testing. It helps to run tests outside of the dev container.
This PR does:
tox
supportpytest
runner and mocktflite
and file system accessThe last point deserves your detailed review. The issue is how the
create_ffmpeg_cmds()
being called. I moved it underruntime_config
property code, though I'm not sure what was your original intent.