From 9ce01e2e836be431f87e5bfda83df5eace20b786 Mon Sep 17 00:00:00 2001 From: hahn-th Date: Sat, 16 Jul 2022 15:39:10 +0200 Subject: [PATCH] Lib should be tested against python 3.8, 3.9, 3.10 --- .circleci/config.yml | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48807c2f..ef9ff460 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,81 @@ orbs: python: circleci/python@2.0.3 jobs: + + test_3_8: + docker: + # specify the version you desire here + # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` + - image: cimg/python:3.8 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + environment: + TZ: "/usr/share/zoneinfo/Europe/Berlin" + + steps: + - checkout + - run: + name: install dependencies + command: | + python -m venv venv + . venv/bin/activate + pip install -r requirements_dev.txt + + # run tests! + # https://pytest.org + - run: + name: run tests + command: | + . venv/bin/activate + export PYTHONPATH=`pwd`; + pytest -x --cov=./ --junitxml=test-reports/junit.xml tests -vv + + - store_test_results: + path: test-reports + + - store_artifacts: + path: test-reports + destination: test-reports + test_3_9: + docker: + # specify the version you desire here + # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` + - image: cimg/python:3.9 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + environment: + TZ: "/usr/share/zoneinfo/Europe/Berlin" + + steps: + - checkout + - run: + name: install dependencies + command: | + python -m venv venv + . venv/bin/activate + pip install -r requirements_dev.txt + + # run tests! + # https://pytest.org + - run: + name: run tests + command: | + . venv/bin/activate + export PYTHONPATH=`pwd`; + pytest -x --cov=./ --junitxml=test-reports/junit.xml tests -vv + + - store_test_results: + path: test-reports + + - store_artifacts: + path: test-reports + destination: test-reports test_3_10: docker: # specify the version you desire here @@ -87,12 +162,22 @@ workflows: version: 2 build_and_deploy: jobs: + - test_3_8: + filters: + tags: + only: /.*/ + - test_3_9: + filters: + tags: + only: /.*/ - test_3_10: filters: tags: only: /.*/ - deploy: requires: + - test_3_8 + - test_3_9 - test_3_10 filters: branches: