Skip to content

Commit

Permalink
Update .gitlab-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Coddington committed Feb 23, 2022
1 parent 0d7cf19 commit d7b964c
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
include:
- project: kount/third_party/tpa-ci-shared
file: base/sq-scan.yml
ref: 2.4.0

# image: python:3.6-alpine - Remove dependecies
image: python:3.8-slim-buster
file:
- base/sq-scan.yml
- core/rules.yml
ref: 2.5.2

stages:
- test
- sonarqube scan
- deploy


before_script:
# - apk update && apk add gcc python3-dev musl-dev libffi-dev
- pip install --upgrade pip
- pip install twine
- pip install pytest
- python setup.py sdist bdist_wheel
.python:
image: python:3.8-slim-buster
before_script:
- pip install --upgrade pip
- python setup.py sdist bdist_wheel

test:
stage: test
extends: .python
rules:
- !reference [.rule-on-master]
- !reference [.rule-on-mr]
- !reference [.rule-on-tag]
script:
- pip install pytest
- pip install .
- pip install .[tests]
- pytest tests --merchant-id=${RIS_SDK_SANDBOX_MERCHANT_ID} --api-key=${RIS_SDK_SANDBOX_API_KEY} --conf-key=$(echo ${RIS_CONFIG_KEY_BASE64} | openssl base64 -d)
Expand All @@ -35,11 +38,13 @@ sonarqube scan:

deploy_production:
stage: deploy
extends: .python
rules:
- !reference [.rule-on-tag]
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- pip install twine
- twine upload dist/*
only:
- tags

0 comments on commit d7b964c

Please sign in to comment.