summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2021-01-28 08:45:24 +0100
committerGitHub <noreply@github.com>2021-01-28 08:45:24 +0100
commitfd179d4f88bf0707ef44fd5e3e007725a0331696 (patch)
tree52d99948a62b45a2129afc350e70824b559d7ae6
parentfac0874002cbb12fbacfb5fad28732c9c20d2e53 (diff)
parent2de64cfa469c9d644a2950d3a4884f622ed9faf4 (diff)
downloadgitlab-fd179d4f88bf0707ef44fd5e3e007725a0331696.tar.gz
Merge pull request #1269 from nejch/fix/test-env
chore(ci): bring test environment back to life
-rw-r--r--.github/workflows/docs.yml39
-rw-r--r--.github/workflows/lint.yml23
-rw-r--r--.github/workflows/test.yml71
-rw-r--r--.renovaterc.json2
-rw-r--r--.travis.yml108
-rw-r--r--docker-requirements.txt1
-rw-r--r--tools/functional/fixtures/.env (renamed from .env)0
7 files changed, 135 insertions, 109 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..04f47b6
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,39 @@
+name: Docs
+
+on: [push, pull_request]
+
+env:
+ PY_COLORS: 1
+
+jobs:
+ sphinx:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: pip install tox
+ - name: Build docs
+ env:
+ TOXENV: docs
+ run: tox
+
+ twine-check:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: pip install tox twine wheel
+ - name: Check twine readme rendering
+ env:
+ TOXENV: twine-check
+ run: |
+ python3 setup.py sdist bdist_wheel
+ tox
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..535fa01
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,23 @@
+name: Lint
+
+on: [push, pull_request]
+
+env:
+ PY_COLORS: 1
+
+jobs:
+ black:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ - uses: psf/black@stable
+ with:
+ black_args: ". --check"
+ commitlint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: wagoid/commitlint-github-action@v2
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..44708d3
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,71 @@
+name: Test
+
+on: [push, pull_request]
+
+env:
+ PY_COLORS: 1
+
+jobs:
+ unit:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ include:
+ - python-version: 3.6
+ toxenv: py36
+ - python-version: 3.7
+ toxenv: py37
+ - python-version: 3.8
+ toxenv: py38
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: pip install tox pytest-github-actions-annotate-failures
+ - name: Run tests
+ env:
+ TOXENV: ${{ matrix.toxenv }}
+ run: tox
+
+ functional:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ toxenv: [py_func_v4, cli_func_v4]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: pip install tox pytest-github-actions-annotate-failures
+ - name: Run tests
+ env:
+ TOXENV: ${{ matrix.toxenv }}
+ run: tox
+
+ coverage:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: pip install tox pytest-github-actions-annotate-failures
+ - name: Run tests
+ env:
+ PY_COLORS: 1
+ TOXENV: cover
+ run: tox
+ - name: Upload codecov coverage
+ uses: codecov/codecov-action@v1
+ with:
+ files: ./coverage.xml
+ flags: unit
+ fail_ci_if_error: true
diff --git a/.renovaterc.json b/.renovaterc.json
index 037a97e..b46c8f4 100644
--- a/.renovaterc.json
+++ b/.renovaterc.json
@@ -4,7 +4,7 @@
],
"regexManagers": [
{
- "fileMatch": ["^.env$"],
+ "fileMatch": ["^tools/functional/fixtures/.env$"],
"matchStrings": ["GITLAB_TAG=(?<currentValue>.*?)\n"],
"depNameTemplate": "gitlab/gitlab-ce",
"datasourceTemplate": "docker",
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 09359b5..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,108 +0,0 @@
-sudo: required
-services:
- - docker
-language: python
-
-git:
- depth: false
-
-stages:
- - lint
- - test
-
-jobs:
- include:
- - stage: lint
- name: commitlint
- python: 3.8
- script:
- - pip3 install pre-commit
- - pre-commit run --hook-stage manual commitlint-travis
- cache:
- directories:
- - $HOME/.cache/pre-commit
- - stage: lint
- name: black_lint
- dist: bionic
- python: 3.8
- script:
- - pip3 install -U --pre black==20.8b1
- - black --check .
- - stage: test
- name: cli_func_v4
- dist: bionic
- python: 3.8
- script:
- - pip3 install tox
- - tox -e cli_func_v4
- - stage: test
- name: py_func_v4
- dist: bionic
- python: 3.8
- script:
- - pip3 install tox
- - tox -e py_func_v4
- - stage: test
- name: cli_func_nightly
- dist: bionic
- python: 3.8
- env: GITLAB_TAG=nightly
- script:
- - pip3 install tox
- - tox -e cli_func_v4
- - stage: test
- name: py_func_nightly
- dist: bionic
- python: 3.8
- env: GITLAB_TAG=nightly
- script:
- - pip3 install tox
- - tox -e py_func_v4
- - stage: test
- name: docs
- dist: bionic
- python: 3.8
- script:
- - pip3 install tox
- - tox -e docs
- - stage: test
- name: py36
- python: 3.6
- dist: bionic
- script:
- - pip3 install tox
- - tox -e py36
- - stage: test
- name: py37
- dist: bionic
- python: 3.7
- script:
- - pip3 install tox
- - tox -e py37
- - stage: test
- dist: bionic
- name: py38
- python: 3.8
- script:
- - pip3 install tox
- - tox -e py38
- - stage: test
- dist: bionic
- name: twine-check
- python: 3.8
- script:
- - pip3 install tox wheel
- - python3 setup.py sdist bdist_wheel
- - tox -e twine-check
- - stage: test
- dist: bionic
- name: coverage
- python: 3.8
- install:
- - pip3 install tox codecov
- script:
- - tox -e cover
- after_success:
- - codecov
- allow_failures:
- - env: GITLAB_TAG=nightly
diff --git a/docker-requirements.txt b/docker-requirements.txt
index 1bcd74b..b7a3333 100644
--- a/docker-requirements.txt
+++ b/docker-requirements.txt
@@ -1,4 +1,5 @@
-r requirements.txt
-r test-requirements.txt
+docker-compose==1.28.2 # prevent inconsistent .env behavior from system install
pytest-console-scripts
pytest-docker
diff --git a/.env b/tools/functional/fixtures/.env
index ada8b49..ada8b49 100644
--- a/.env
+++ b/tools/functional/fixtures/.env