-
Notifications
You must be signed in to change notification settings - Fork 54
Update python tests job #88
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,16 @@ LABEL summary="Toolchain for running pre-commit hooks." \ | |
io.k8s.display-name="Pre-Commit Toolchain" | ||
|
||
USER root | ||
RUN dnf install nodejs | ||
RUN dnf install nodejs -y && \ | ||
dnf clean all && \ | ||
rm -rf /var/cache/dnf | ||
ADD https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz $TMPDIR/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that if we use ADD here, the Docker will create a separate image layer with tar file. And even if we delete it in the next command it will stay in the image. It will be only hidden by next layer. I would suggest to download tar with oc as part of the RUN command on next line. |
||
RUN tar -C /usr/local/bin -xvf $TMPDIR/oc.tar.gz && \ | ||
chmod +x /usr/local/bin/oc && \ | ||
rm $TMPDIR/oc.tar.gz | ||
USER $USERID | ||
|
||
COPY requirements-dev.txt /tmp/requirements-dev.txt | ||
RUN python -m pip install -r /tmp/requirements-dev.txt | ||
COPY requirements.txt /tmp/requirements.txt | ||
RUN python -m pip install -r /tmp/requirements.txt | ||
|
||
CMD bash |
This file was deleted.
KPostOffice marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
openshift-client==1.0.18 | ||
rich==12.5.1 | ||
ray[default]==2.1.0 | ||
kubernetes==26.1.0 | ||
codeflare-torchx==0.6.0.dev0 | ||
pre-commit | ||
poetry | ||
pytest | ||
pytest-mock | ||
coverage | ||
black==22.3.0 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Python Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
unit-tests: | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/project-codeflare/codeflare-sdk-precommit:v0.0.3 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Test with pytest and check coverage | ||
run: | | ||
coverage run -m --source=src pytest -v tests/unit_test.py | ||
coverage=$(coverage report -m | tail -1 | tail -c 4 | head -c 2) | ||
if (( $coverage < 90 )); then exit 1; else echo "Coverage passed, ${coverage}%"; fi |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.