-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'test/setup-gitlab-cicd' into 'develop'
Add gitlab ci/cd Closes #807 See merge request sds-dev/sd-submit/metadata-submitter!809
- Loading branch information
Showing
12 changed files
with
107 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
stages: | ||
- verify | ||
- test | ||
|
||
variables: | ||
BUILD_IMAGE: $ARTIFACTORY_SERVER/sds/sdd-common-ci | ||
|
||
linting: | ||
stage: verify | ||
tags: | ||
- docker-exec | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' | ||
image: $BUILD_IMAGE | ||
before_script: | ||
- pip install -r requirements-dev.txt | ||
script: | ||
- pre-commit run --all-files -c .pre-commit-config.yaml --show-diff-on-failure --color never | ||
- tox -e docs | ||
|
||
spellcheck: | ||
stage: verify | ||
tags: | ||
- docker-exec | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' | ||
image: $BUILD_IMAGE | ||
before_script: | ||
- pip install pyspelling | ||
script: | ||
- pyspelling | ||
|
||
unittest: | ||
stage: test | ||
tags: | ||
- docker-exec | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' | ||
image: $BUILD_IMAGE | ||
before_script: | ||
- pip install -r requirements-dev.txt | ||
script: | ||
- tox -e py311 | ||
- coverage report --precision=1 | ||
coverage: '/TOTAL.*\s+(\d+\%)/' | ||
|
||
# TODO: make docker compose work in gitlab runner | ||
# integration: | ||
# stage: verify | ||
# tags: | ||
# - docker-exec | ||
# rules: | ||
# - if: $CI_PIPELINE_SOURCE == 'merge_request_event' | ||
# services: | ||
# - name: registry.hub.docker.com/library/docker:24.0.6-dind | ||
# alias: docker | ||
# variables: | ||
# DOCKER_HOST: tcp://docker:2375/ | ||
# DOCKER_DRIVER: overlay2 | ||
# BASE_URL: http://localhost:5430 | ||
# OIDC_URL: http://localhost:8000 | ||
# OIDC_URL_TEST: http://mockauth:8000 | ||
# FF_NETWORK_PER_BUILD: "true" | ||
# image: docker:24.0.6 | ||
# before_script: | ||
# - apk --update --no-cache add python3 | ||
# - python3 -m ensurepip | ||
# - pip3 install --no-cache --upgrade pip setuptools | ||
# - pip install aiohttp aiofiles motor pytest pytest-asyncio | ||
# script: | ||
# - docker compose -f docker-compose.yml --env-file .env.example up --build -d | ||
# - sleep 30 | ||
# - docker network inspect metadata-submitter_default | ||
# - docker compose -f docker-compose.yml --env-file .env.example ps | ||
# - pytest tests/integration/ | ||
# after_script: | ||
# - docker compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters