Cédric Krier pushed to branch branch/default at Tryton / python-sql


Commits:
09d5dea5 by Cédric Krier at 2022-12-22T16:14:24+01:00
Add gitlab CI
- - - - -


2 changed files:

- − .drone.yml
- + .gitlab-ci.yml


Changes:

=====================================
.drone.yml deleted
=====================================
@@ -1,33 +0,0 @@
-clone:
-    hg:
-        image: plugins/hg
-        environment:
-            - HG_SHARE_POOL=/root/.cache/hg
-        volumes:
-            - cache:/root/.cache
-
-pipeline:
-    tox:
-        image: ${IMAGE}
-        commands:
-            - pip install tox
-            - tox -e "${TOXENV}"
-        volumes:
-            - cache:/root/.cache
-
-matrix:
-    include:
-        - IMAGE: python:3.5
-          TOXENV: py35
-        - IMAGE: python:3.6
-          TOXENV: py36
-        - IMAGE: python:3.7
-          TOXENV: py37
-        - IMAGE: python:3.8
-          TOXENV: py38
-        - IMAGE: python:3.9
-          TOXENV: py39
-        - IMAGE: python:3.10
-          TOXENV: py310
-        - IMAGE: pypy:3
-          TOXENV: pypy3


=====================================
.gitlab-ci.yml
=====================================
@@ -0,0 +1,61 @@
+workflow:
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "trigger"
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
+      when: never
+    - if: $CI_COMMIT_BRANCH =~ /^branch\/.*/
+
+stages:
+  - check
+  - test
+
+.check:
+  stage: check
+  rules:
+    - if: $CI_MERGE_REQUEST_ID != null
+      when: always
+  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/tryton/ci
+
+check-flake8:
+  extends: .check
+  script:
+    - hg diff --rev s0 | flake8 --diff
+
+check-isort:
+  extends: .check
+  script:
+    - isort -m VERTICAL_GRID -p trytond -c `hg status --no-status --added 
--modified --rev s0`
+
+check-dist:
+  extends: .check
+  before_script:
+    - pip install twine
+  script:
+    - python setup.py sdist
+    - twine check dist/*
+
+.test:
+  stage: test
+  rules:
+    - when: always
+
+.test-tox:
+  extends: .test
+  before_script:
+    - pip install tox
+
+test-tox-python:
+  extends: .test-tox
+  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:${PYTHON_VERSION}
+  script:
+    - tox -e "py${PYTHON_VERSION/./}"
+  parallel:
+    matrix:
+      - PYTHON_VERSION: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
+
+test-tox-pypy:
+  extends: .test-tox
+  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/pypy:3
+  script:
+    - tox -e pypy3



View it on Heptapod: 
https://foss.heptapod.net/tryton/python-sql/-/commit/09d5dea5c902974d7a3f5fe7a2847537cf7d02ed

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/python-sql/-/commit/09d5dea5c902974d7a3f5fe7a2847537cf7d02ed
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to