Change add Gitlab tests

This commit is contained in:
Prinz23 2024-06-26 01:37:04 +02:00 committed by JackDandy
parent 13763cab4b
commit 80cffd7cef
2 changed files with 80 additions and 0 deletions

75
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,75 @@
test 3.8:
image: python:3.8
stage: test
before_script:
- pip install responses
- pip install -r requirements.txt
- pip install coveralls
script:
- cd ./tests
- coverage run --source=.. --omit=../lib/* ./all_tests.py
when: manual
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "dev"
test 3.9:
image: python:3.9
stage: test
before_script:
- pip install responses
- pip install -r requirements.txt
- pip install coveralls
script:
- cd ./tests
- coverage run --source=.. --omit=../lib/* ./all_tests.py
when: manual
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "dev"
test 3.10:
image: python:3.10
stage: test
before_script:
- pip install responses
- pip install -r requirements.txt
- pip install coveralls
script:
- cd ./tests
- coverage run --source=.. --omit=../lib/* ./all_tests.py
when: manual
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "dev"
test 3.11:
image: python:3.11
stage: test
before_script:
- pip install responses
- pip install -r requirements.txt
- pip install coveralls
script:
- cd ./tests
- coverage run --source=.. --omit=../lib/* ./all_tests.py
when: manual
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "dev"
test 3.12:
image: python:3.12
stage: test
before_script:
- pip install responses
- pip install -r requirements.txt
- pip install coveralls
script:
- cd ./tests
- coverage run --source=.. --omit=../lib/* ./all_tests.py
when: manual
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "dev"

View file

@ -1,9 +1,14 @@
import os
import sys
import warnings
warnings.filterwarnings('ignore', module=r'.*fuz.*', message='.*Sequence.*')
warnings.filterwarnings('ignore', module=r'.*connectionpool.*', message='.*certificate verification.*')
import unittest
sys.path.insert(1, os.path.abspath('..'))
sys.path.insert(1, os.path.abspath('../lib'))
from sickgear import properFinder
import sickgear