Skip to content

Commit

Permalink
Added gitlab-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu Marinoiu committed Jan 18, 2022
1 parent cd8d18a commit 96475ee
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include:
- template: Code-Quality.gitlab-ci.yml

image:
python:3.10-bullseye

stages:
- test

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'

unit-test-job:
stage: test
before_script:
- python3 -m pip install --upgrade -r requirements.txt
- python3 -m pip install --upgrade -r requirements_ci.txt
script:
- echo "Running unit tests..."
- coverage run --source=tap_mambu/tap_mambu_refactor -m pytest tests/refactor_unittests
- coverage json
- python3 -c "import json; coverage_json = json.loads(open('coverage.json', 'r').read()); print('Coverage is', round(coverage_json['totals']['percent_covered'], 2))"

lint-test-job:
stage: test
before_script:
- python3 -m pip install --upgrade -r requirements.txt
- python3 -m pip install --upgrade -r requirements_ci.txt
script:
- echo "Linting code..."
- pylint tap_mambu/tap_mambu_refactor --exit-zero
- pylint tap_mambu/tap_mambu_refactor -d C -d R -d W || true

0 comments on commit 96475ee

Please sign in to comment.