From f312b476ec0d29108e00a73e25062dc67a20d3da Mon Sep 17 00:00:00 2001 From: ricolin Date: Tue, 19 Nov 2024 13:05:10 +0800 Subject: [PATCH] Add Zuul supports --- .github/workflows/linters.yaml | 15 --------------- tox.ini | 11 +++++++---- zuul.d/jobs.yaml | 9 +++++++++ zuul.d/project.yaml | 5 +++++ 4 files changed, 21 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/linters.yaml create mode 100644 zuul.d/jobs.yaml create mode 100644 zuul.d/project.yaml diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml deleted file mode 100644 index c20fdb1..0000000 --- a/.github/workflows/linters.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: linters -on: push - -jobs: - super-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: github/super-linter@v4 - env: - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_ALL_CODEBASE: true - VALIDATE_PYTHON_MYPY: false - VALIDATE_JSCPD: false diff --git a/tox.ini b/tox.ini index 47da115..f248ec8 100755 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,py310,pep8 +envlist = py3,py37,py38,py39,py310,linters skipsdist = True sitepackages = False skip_missing_interpreters = True @@ -20,15 +20,18 @@ install_commands = pip install {opts} {packages} -[testenv:py3] +[testenv:{py3,py38,py39,py310}] basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} -[testenv:pep8] +[testenv:linters] +skipsdist = True +deps = + pre-commit commands = - flake8 + pre-commit run --all-files --show-diff-on-failure [testenv:cover] basepython = python3 diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 0000000..d7e620d --- /dev/null +++ b/zuul.d/jobs.yaml @@ -0,0 +1,9 @@ +- job: + name: staffeln-linters + parent: tox-linters + +- job: + name: staffeln-unit + parent: tox + vars: + tox_envlist: py3 diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml new file mode 100644 index 0000000..065d68e --- /dev/null +++ b/zuul.d/project.yaml @@ -0,0 +1,5 @@ +- project: + check: + jobs: + - staffeln-linters + - staffeln-unit