6
0
Kaynağa Gözat

Resolve "run tests with old python versions only for master branch"

Eric Tröbs 4 yıl önce
ebeveyn
işleme
6243a311cb
1 değiştirilmiş dosya ile 27 ekleme ve 0 silme
  1. 27 0
      .gitlab-ci.yml

+ 27 - 0
.gitlab-ci.yml

@@ -24,6 +24,8 @@ webui:
 tests_3.6:
   stage: test
   image: python:3.6
+  only:
+    - master
   variables:
     PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
   cache:
@@ -42,6 +44,8 @@ tests_3.6:
 tests_3.7:
   stage: test
   image: python:3.7
+  only:
+    - master
   variables:
     PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
   cache:
@@ -60,6 +64,8 @@ tests_3.7:
 tests_3.8:
   stage: test
   image: python:3.8
+  only:
+    - master
   variables:
     PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
   cache:
@@ -94,6 +100,27 @@ tests_3.9:
     - coverage run --source=pycs/ -m unittest discover test/
     - coverage report -m
 
+tests_3.10:
+  stage: test
+  image: python:3.10-rc
+  allow_failure: true
+  only:
+    - master
+  variables:
+    PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+  cache:
+    key: "$CI_JOB_NAME"
+    paths:
+      - .cache/pip
+      - env/
+  before_script:
+    - python -V
+    - python -m venv env
+    - source env/bin/activate
+    - pip install coverage
+  script:
+    - coverage run --source=pycs/ -m unittest discover test/
+
 
 bundle:
   stage: deploy