Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
id: extract_branch
- name: build
if: success()
run: make version backend-docker-check GIT_BRANCH=$GIT_BRANCH || ( make backend-build GIT_BRANCH=$GIT_BRANCH && make backend backend-stop GIT_BRANCH=$GIT_BRANCH)
run: make version backend-docker-check GIT_BRANCH=$GIT_BRANCH || ( make backend-build GIT_BRANCH=$GIT_BRANCH && make backend GIT_BRANCH=$GIT_BRANCH)
env:
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: tests
if: success()
run: make tests backend-stop GIT_BRANCH=$GIT_BRANCH
env:
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
7 changes: 6 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ jobs:
id: extract_branch
- name: build
if: success()
run: make version backend-docker-check GIT_BRANCH=$GIT_BRANCH || ( make backend-build GIT_BRANCH=$GIT_BRANCH && make backend backend-stop GIT_BRANCH=$GIT_BRANCH)
run: make version backend-docker-check GIT_BRANCH=$GIT_BRANCH || ( make backend-build GIT_BRANCH=$GIT_BRANCH && make backend GIT_BRANCH=$GIT_BRANCH)
env:
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: tests
if: success()
run: make tests backend-stop GIT_BRANCH=$GIT_BRANCH
env:
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: publish
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN mkdir -p code\
conf/run\
log\
referential_data\
matchID_test/\
tests\
upload

################################
Expand All @@ -41,11 +41,13 @@ WORKDIR /${APP}
COPY code/ code/
COPY conf/ conf/
COPY referential_data/ referential_data/
COPY tests/ tests/

VOLUME /${app_path}/projects
VOLUME /${app_path}/log
VOLUME /${app_path}/models
VOLUME /${app_path}/upload
VOLUME /${app_path}/tests

EXPOSE ${BACKEND_PORT}

Expand All @@ -68,6 +70,7 @@ VOLUME /${APP}/referential_data
VOLUME /${APP}/log
VOLUME /${APP}/models
VOLUME /${APP}/upload
VOLUME /${APP}/tests

EXPOSE ${BACKEND_PORT}

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export GITHUB_OAUTH_SECRET=203010f81158d3ceab0297a213e80bc0fbfe7f8e
export BACKEND := $(shell pwd)
export UPLOAD=${BACKEND}/upload
export PROJECTS=${BACKEND}/projects
export TESTS=${BACKEND}/tests
export EXAMPLES=${BACKEND}/../examples
export TUTORIAL=${BACKEND}/../tutorial
export MODELS=${BACKEND}/models
Expand Down Expand Up @@ -696,3 +697,8 @@ deploy-remote: config deploy-remote-instance deploy-remote-services deploy-remot

clean-remote:
@make -C ${APP_PATH}/${GIT_TOOLS} remote-clean ${MAKEOVERRIDES} > /dev/null 2>&1 || true

tests:
@docker exec -i ${USE_TTY} ${DC_PREFIX}-${APP} pytest -q -W "ignore::DeprecationWarning" -W "ignore::FutureWarning"

.PHONY: tests
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,14 @@ If you want to contribute to the developpement, you'll be able to fork the repo
```
make start-dev
```

### Running tests
Install dependencies and run tests with Make:
```bash
make tests
```
You can also install the requirements and run pytest directly:
```bash
pip install -r requirements.txt
pytest
```
1 change: 1 addition & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ services:
- ${BACKEND}/code/:/${APP_GROUP}/code/
- ${BACKEND}/referential_data/:/${APP_GROUP}/referential_data/
- ${BACKEND}/conf/:/${APP_GROUP}/conf/
- ${BACKEND}/tests/:/${APP_GROUP}/tests/
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ typing
Werkzeug==3.0.3
rsa>=4.7 # not directly required, pinned by Snyk to avoid a vulnerability
zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability
pyarrow>=14.0.1
pyarrow>=14.0.1
pytest
Loading
Loading