From f3bc284c90a219b4b1c5a9e0e593c05110b567c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com> Date: Mon, 2 Sep 2024 15:08:53 +0200 Subject: [PATCH] fixed tests --- .codeclimate.yml | 24 ---------- .gitlab-ci.yml | 72 +++++++++++++++++----------- .readthedocs.yaml | 10 ---- .travis.yml | 120 ---------------------------------------------- 4 files changed, 45 insertions(+), 181 deletions(-) delete mode 100644 .codeclimate.yml delete mode 100644 .readthedocs.yaml delete mode 100644 .travis.yml diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 436bd44..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,24 +0,0 @@ -engines: - duplication: - enabled: true - config: - languages: - python: - - fixme: - enabled: true - markdownlint: - enabled: true - pep8: - enabled: true - radon: - enabled: true -exclude_paths: - - examples/** - - tests/** - - coolamqp/framing/definitions.py - - compile_definitions/** - - stress_tests/** -ratings: - paths: - - coolamqp/** diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34fbc45..6421506 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,53 +1,71 @@ stages: - - test + - unittest - build -stress_test: - stage: test + +.before_test: + stage: unittest services: - name: rabbitmq:3-management alias: rabbitmq before_script: - python setup.py install + - pip install --break-system-packages nose2 coverage requests yapf - coverage run --append -m compile_definitions + artifacts: + paths: + - ".coverage.*" + variables: + AMQP_HOST: "rabbitmq" + + +stresstest_select: + extends: .before_test script: - coverage run --append -m stress_tests - - COOLAMQP_FORCE_SELECT_LISTENER=1 coverage run --append -m stress_tests variables: + COOLAMQP_FORCE_SELECT_LISTENER: "1" AMQP_HOST: "rabbitmq" after_script: - - mv .coverage .coverage.stress - artifacts: - paths: - - ".coverage.stress" + - mv .coverage .coverage.stressselect -unittest: - stage: test - image: python:3.11 # Default image might have already CoolAMQP installed - services: - - name: rabbitmq:3-management - alias: rabbitmq - before_script: - - python setup.py install - - pip install --break-system-packages nose2 coverage requests yapf - - coverage run --append -m compile_definitions + + +stresstest_epoll: + extends: .before_test script: - - coverage run --append -m nose2 -F -vv - - COOLAMQP_FORCE_SELECT_LISTENER=1 coverage run --append -m nose2 -F -vv + - coverage run --append -m stress_tests after_script: - - mv .coverage .coverage.units + - mv .coverage .coverage.stressepoll + + + +unittest_select: + extends: .before_test + script: + - coverage run --append -m nose2 -F -vv variables: + COOLAMQP_FORCE_SELECT_LISTENER: "1" AMQP_HOST: "rabbitmq" - artifacts: - paths: - - ".coverage.units" - + after_script: + - mv .coverage .coverage.unitselect + + +unittest_epoll: + extends: .before_test + script: + - coverage run --append -m nose2 -F -vv + after_script: + - mv .coverage .coverage.unitepoll + calc_coverage: stage: build dependencies: - - unittest - - stress_test + - unittest_epoll + - unittest_select + - stresstest_epoll + - stresstest_select script: - coverage combine - coverage xml diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index 1e246be..0000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2 -build: - os: ubuntu-22.04 - tools: - python: "3.9" -sphinx: - configuration: docs/conf.py -python: - install: - - requirements: docs/requirements.txt diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b9f3946..0000000 --- a/.travis.yml +++ /dev/null @@ -1,120 +0,0 @@ -language: python -stages: - - name: test - - name: deploy - if: tag is present -cache: pip -jobs: - include: - - stage: test - python: "2.7" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "3.5" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "3.6" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "3.7" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "3.8" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "3.9" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "nightly" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "pypy" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: test - python: "pypy3.5" - script: - - bash tests/travis_test.sh - after_script: - - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT - services: rabbitmq - addons: - apt: - packages: - - rabbitmq-server - - stage: deploy - python: "3.8" - script: - - bash tests/travis_build.sh -- GitLab