diff options
| author | jfriedli | 2023-06-13 18:52:43 +0000 |
|---|---|---|
| committer | jfriedli | 2023-06-13 18:52:43 +0000 |
| commit | e90391a271d9f06e16c877ee5f0542f1e68c8263 (patch) | |
| tree | 4c61389e6fc3ae84d3c4b70cbd6d7c6df1a727dc | |
| parent | 0698aec1cb882cd4bbc25a084510301f4097c859 (diff) | |
CI Fix
| -rw-r--r-- | .gitlab-ci.yml | 20 | ||||
| -rw-r--r-- | requirements-test.txt | 5 |
2 files changed, 16 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ab79ea..11a6e66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml | |||
| @@ -17,9 +17,11 @@ mypy: | |||
| 17 | stage: linting | 17 | stage: linting |
| 18 | script: | 18 | script: |
| 19 | - apt-get -qqy update | 19 | - apt-get -qqy update |
| 20 | - apt-get -qqy install --no-install-recommends python3-pip | 20 | - apt-get -qqy install --no-install-recommends python3-venv python3-pip |
| 21 | - pip3 install mypy | 21 | - python3 -m venv .venv |
| 22 | - pip3 install -r requirements-test.txt | 22 | - source .venv/bin/activate |
| 23 | - pip install mypy | ||
| 24 | - pip install -r requirements-test.txt | ||
| 23 | - mypy --ignore-missing-imports --explicit-package-bases matweb main.py | 25 | - mypy --ignore-missing-imports --explicit-package-bases matweb main.py |
| 24 | 26 | ||
| 25 | bandit: | 27 | bandit: |
| @@ -35,12 +37,14 @@ tests:debian: | |||
| 35 | - apt update | 37 | - apt update |
| 36 | script: | 38 | script: |
| 37 | - apt-get -qqy update | 39 | - apt-get -qqy update |
| 38 | - apt-get -qqy install --no-install-recommends mat2 python3-flask python3-coverage python3-pip python3-setuptools | 40 | - apt-get -qqy install --no-install-recommends build-essential libgirepository1.0-dev mat2 python3-venv python3-dev python3-pip python3-setuptools libcairo2-dev pkg-config |
| 39 | - pip3 install wheel | 41 | - python3 -m venv .venv |
| 42 | - source .venv/bin/activate | ||
| 40 | - pip3 install -r requirements.txt -r requirements-test.txt | 43 | - pip3 install -r requirements.txt -r requirements-test.txt |
| 41 | - python3-coverage run --branch --include main.py,matweb/*.py -m unittest discover -s test | 44 | - coverage run --branch --include main.py,matweb/*.py -m unittest discover -s test |
| 42 | - python3-coverage report -m | 45 | - coverage report -m |
| 43 | - python3-coverage xml | 46 | - coverage xml |
| 47 | coverage: '/TOTAL.*(\d\d%)/' | ||
| 44 | artifacts: | 48 | artifacts: |
| 45 | reports: | 49 | reports: |
| 46 | coverage_report: | 50 | coverage_report: |
diff --git a/requirements-test.txt b/requirements-test.txt index 70dd298..bd249c2 100644 --- a/requirements-test.txt +++ b/requirements-test.txt | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | openapi-spec-validator==0.2.8 | 1 | openapi-spec-validator==0.2.8 |
| 2 | types-Flask==1.1.0 | 2 | types-Flask==1.1.0 |
| 3 | types-Jinja2==2.11.1 | 3 | types-Jinja2==2.11.1 |
| 4 | types-PyYAML==0.1.7 \ No newline at end of file | 4 | types-PyYAML==0.1.7 |
| 5 | wheel==0.40.0 | ||
| 6 | coverage==7.2.7 | ||
| 7 | Flask-Testing==0.8.1 \ No newline at end of file | ||
