-
Notifications
You must be signed in to change notification settings - Fork 69
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
cruft removal attempt #1308
base: dev
Are you sure you want to change the base?
cruft removal attempt #1308
Changes from all commits
ecfa304
1d1f36a
6016c24
10c30cd
bbdb34c
3ba08e4
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,18 +5,6 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: mkdir -p repos/undefx | ||
- name: Checkout undefx/py3tester | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: undefx/py3tester | ||
path: repos/undefx/py3tester | ||
- name: Checkout undefx/undef-analysis | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: undefx/undef-analysis | ||
path: repos/undefx/undef-analysis | ||
|
||
- run: mkdir -p repos/delphi | ||
|
||
- name: Checkoutcmu-delphi/operations | ||
|
@@ -29,25 +17,10 @@ jobs: | |
with: | ||
repository: cmu-delphi/utils | ||
path: repos/delphi/utils | ||
- name: Checkout cmu-delphi/github-deploy-repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: cmu-delphi/github-deploy-repo | ||
path: repos/delphi/github-deploy-repo | ||
- name: Checkout THIS REPO | ||
uses: actions/checkout@v2 | ||
with: | ||
path: repos/delphi/delphi-epidata | ||
- name: Checkout cmu-delphi/flu-contest | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: cmu-delphi/flu-contest | ||
path: repos/delphi/flu-contest | ||
- name: Checkout cmu-delphi/nowcast | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: cmu-delphi/nowcast | ||
path: repos/delphi/nowcast | ||
|
||
- name: Build docker images | ||
run: | | ||
|
@@ -80,11 +53,17 @@ jobs: | |
|
||
- name: Run Unit Tests | ||
run: | | ||
docker run --rm --network delphi-net --env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" delphi_web_python python -m pytest --import-mode importlib repos/delphi/delphi-epidata/tests | ||
docker run --rm --network delphi-net \ | ||
--mount type=bind,source=./repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \ | ||
--mount type=bind,source=./repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \ | ||
--env "SQLALCHEMY_DATABASE_URI=mysql+mysqldb://user:pass@delphi_database_epidata:3306/epidata" --env "FLASK_SECRET=abc" delphi_web_python python -m pytest --import-mode importlib repos/delphi/delphi-epidata/tests | ||
|
||
- name: Run Integration Tests | ||
run: | | ||
docker run --rm --network delphi-net delphi_web_python python -m pytest --import-mode importlib repos/delphi/delphi-epidata/integrations | ||
docker run --rm --network delphi-net \ | ||
--mount type=bind,source=./repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \ | ||
--mount type=bind,source=./repos/delphi/delphi-epidata/src,target=/usr/src/app/delphi/epidata,readonly \ | ||
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. Question (non-blocking, separate issue): any reason why unit tests and integrations are separated? In the Makefile both are run together, using that command here would remove this Docker command duplication. |
||
delphi_web_python python -m pytest --import-mode importlib repos/delphi/delphi-epidata/integrations | ||
|
||
- name: Clean Up | ||
run: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- for #1129 : | ||
- grep for: | ||
- py3test | ||
- test_target | ||
- and remove from: | ||
- tests/* | ||
- integrations/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,10 +241,7 @@ | |
"dst": "[[stasis]]/integrations/", | ||
"match": "^.*\\.(py)$", | ||
"recursive": true | ||
}, | ||
|
||
"// run unit and coverage tests", | ||
{"type": "py3test"} | ||
Comment on lines
-246
to
-247
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. removing this will prevent |
||
} | ||
|
||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,13 @@ RUN apt-get update && apt-get install -y r-base && Rscript -e "install.packages( | |
|
||
WORKDIR /usr/src/app | ||
|
||
COPY repos repos | ||
COPY repos/delphi/delphi-epidata/dev/docker/python/setup.sh . | ||
|
||
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime && \ | ||
chmod -R o+r repos/ && \ | ||
bash setup.sh && \ | ||
pip install --no-cache-dir -r repos/delphi/delphi-epidata/requirements.api.txt -r repos/delphi/delphi-epidata/requirements.dev.txt | ||
mkdir delphi && \ | ||
chmod -R o+r delphi/ | ||
|
||
COPY repos/delphi/operations/src delphi/operations | ||
COPY repos/delphi/utils/src delphi/utils | ||
COPY repos/delphi/delphi-epidata/src delphi/epidata | ||
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. Comment (non-blocking): this COPY command is later overwritten by a runtime mount between the same folders we run tests. Consider getting rid of this. Thinking out loud (non-blocking): looks like we're dropping the top-level --mount type=bind,source=./repos/delphi/delphi-epidata,target=/usr/src/app/repos/delphi/delphi-epidata,readonly \ So the edit to my first sentence from this sequence of thoughts is: we're not dropping the Comment (non-blocking, separate issue): it's tough to mentally imagine the directory structure of Dockerfile when runtime mounts are involved (due to non-locality between Docker run command and the Dockerfile). Maybe we should add a comment at the end of this Dockerfile saying something like "at runtime, these additional directories are present". Comment (non-blocking, separate issue): a future future solution to this non-locality is to make a unified 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. Most of my review suggestions are addressed by #1315 |
||
|
||
COPY repos/delphi/delphi-epidata/requirements.*.txt . | ||
RUN pip install --no-cache-dir -r requirements.api.txt -r requirements.dev.txt |
This file was deleted.
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.
Comment (non-blocking, probably be separate issue): we should move to having CI use the Makefile commands. It would help keep local testing identical with CI and would remove code duplication.