Loading .coveragerc +3 −3 Original line number Diff line number Diff line [report] omit = tests/* app/brokers/filesys/* app/auth/keycloak.py app/main.py No newline at end of file remote_data_broker/brokers/filesys/* remote_data_broker/auth/keycloak.py remote_data_broker/main.py No newline at end of file .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -7,3 +7,4 @@ __pycache__ .coverage htmlcov coverage.xml dist No newline at end of file .gitlab-ci.yml +19 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ lint: poetry run isort --filter-files --check-only --profile black . ; poetry run black --check --diff .; poetry run flake8 .; poetry run pylint app tests; poetry run pylint remote_data_broker tests; poetry run mypy . " - docker tag remote-data-broker $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA Loading Loading @@ -67,12 +67,14 @@ service-coverage: - > docker run --rm -v $PWD:/reports $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry run pytest --cov=. --cov-fail-under=80 --cov-report=html:/reports/htmlcov --cov-report=xml:/reports/coverage.xml tests/unit " $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry run pytest --cov=. --cov-fail-under=75 --cov-report=html:/reports/htmlcov --cov-report=xml:/reports/coverage.xml tests/unit " - sed -i "s:<source>/code:<source>${CI_BUILDS_DIR}/${CI_PROJECT_PATH}:g" coverage.xml coverage: '/coverage: \d+.\d+%/' artifacts: reports: cobertura: coverage.xml coverage_report: coverage_format: cobertura path: cobertura.xml paths: - htmlcov/ tags: Loading Loading @@ -124,3 +126,17 @@ update-latest-tag: - docker push $CONTAINER_RDM_URL_PROD/$CI_COMMIT_REF_NAME:latest tags: - rse-multi-builder package: stage: update-repo script: - > docker run $CONTAINER_RDM_URL_PROD/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry build && poetry config repositories.gitlab_repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi && poetry publish -u gitlab-ci-token -p ${CI_JOB_TOKEN} -r gitlab_repo " when: manual tags: - rse-multi-builder .pre-commit-config.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ repos: - id: system name: Pylint description: use pylint to lint entry: poetry run pylint app tests entry: poetry run pylint remote_data_broker tests pass_filenames: false language: system - repo: local Loading @@ -68,6 +68,6 @@ repos: - id: system name: Coverage description: use pytest to run unit tests with coverage entry: poetry run pytest --cov=. --cov-fail-under=80 tests/unit entry: poetry run pytest --cov=. --cov-fail-under=75 tests/unit pass_filenames: false language: system No newline at end of file dockerfiles/Dockerfile +2 −2 Original line number Diff line number Diff line FROM code.ornl.gov:4567/rse/images/python-pyenv-tox:0.0.1 as production FROM code.ornl.gov:4567/rse/images/python-pyenv-tox:0.1.0 as production ENV PYTHONFAULTHANDLER=1 \ PYTHONUNBUFFERED=1 \ Loading Loading
.coveragerc +3 −3 Original line number Diff line number Diff line [report] omit = tests/* app/brokers/filesys/* app/auth/keycloak.py app/main.py No newline at end of file remote_data_broker/brokers/filesys/* remote_data_broker/auth/keycloak.py remote_data_broker/main.py No newline at end of file
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -7,3 +7,4 @@ __pycache__ .coverage htmlcov coverage.xml dist No newline at end of file
.gitlab-ci.yml +19 −3 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ lint: poetry run isort --filter-files --check-only --profile black . ; poetry run black --check --diff .; poetry run flake8 .; poetry run pylint app tests; poetry run pylint remote_data_broker tests; poetry run mypy . " - docker tag remote-data-broker $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA Loading Loading @@ -67,12 +67,14 @@ service-coverage: - > docker run --rm -v $PWD:/reports $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry run pytest --cov=. --cov-fail-under=80 --cov-report=html:/reports/htmlcov --cov-report=xml:/reports/coverage.xml tests/unit " $CONTAINER_RDM_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry run pytest --cov=. --cov-fail-under=75 --cov-report=html:/reports/htmlcov --cov-report=xml:/reports/coverage.xml tests/unit " - sed -i "s:<source>/code:<source>${CI_BUILDS_DIR}/${CI_PROJECT_PATH}:g" coverage.xml coverage: '/coverage: \d+.\d+%/' artifacts: reports: cobertura: coverage.xml coverage_report: coverage_format: cobertura path: cobertura.xml paths: - htmlcov/ tags: Loading Loading @@ -124,3 +126,17 @@ update-latest-tag: - docker push $CONTAINER_RDM_URL_PROD/$CI_COMMIT_REF_NAME:latest tags: - rse-multi-builder package: stage: update-repo script: - > docker run $CONTAINER_RDM_URL_PROD/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA bash -c "poetry build && poetry config repositories.gitlab_repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi && poetry publish -u gitlab-ci-token -p ${CI_JOB_TOKEN} -r gitlab_repo " when: manual tags: - rse-multi-builder
.pre-commit-config.yaml +2 −2 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ repos: - id: system name: Pylint description: use pylint to lint entry: poetry run pylint app tests entry: poetry run pylint remote_data_broker tests pass_filenames: false language: system - repo: local Loading @@ -68,6 +68,6 @@ repos: - id: system name: Coverage description: use pytest to run unit tests with coverage entry: poetry run pytest --cov=. --cov-fail-under=80 tests/unit entry: poetry run pytest --cov=. --cov-fail-under=75 tests/unit pass_filenames: false language: system No newline at end of file
dockerfiles/Dockerfile +2 −2 Original line number Diff line number Diff line FROM code.ornl.gov:4567/rse/images/python-pyenv-tox:0.0.1 as production FROM code.ornl.gov:4567/rse/images/python-pyenv-tox:0.1.0 as production ENV PYTHONFAULTHANDLER=1 \ PYTHONUNBUFFERED=1 \ Loading