diff --git a/.github/workflows/test-cookiecutter.yml b/.github/workflows/test-cookiecutter.yml deleted file mode 100644 index 644dcf9..0000000 --- a/.github/workflows/test-cookiecutter.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: Test cookiecutter - -"on": - push: - branches: - - main - - pull_request: - -jobs: - test-cookiecutter: - runs-on: ubuntu-latest - strategy: - matrix: - openstack-version: - - yoga - - zed - - "2023.1" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - uses: actions/cache@v3 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - run: pip install -r requirements.txt - - run: cookiecutter --no-input . openstack_version=${{ matrix.openstack-version }} diff --git a/.zuul.yaml b/.zuul.yaml index b0ad4b1..1eabd0e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,31 @@ --- +- job: + name: cfg-cookiecutter-tox + parent: tox + vars: + tox_envlist: cookiecutter + +- job: + name: cfg-cookiecutter-tox-yoga + parent: cfg-cookiecutter-tox + vars: + tox_environment: + OPENSTACK_VERSION: yoga + +- job: + name: cfg-cookiecutter-tox-zed + parent: cfg-cookiecutter-tox + vars: + tox_environment: + OPENSTACK_VERSION: zed + +- job: + name: cfg-cookiecutter-tox-antelope + parent: cfg-cookiecutter-tox + vars: + tox_environment: + OPENSTACK_VERSION: "2023.1" + - project: merge-mode: squash-merge default-branch: main @@ -8,15 +35,24 @@ - flake8 - hadolint - yamllint + - cfg-cookiecutter-tox-yoga + - cfg-cookiecutter-tox-zed + - cfg-cookiecutter-tox-antelope gate: jobs: - ansible-lint - flake8 - hadolint - yamllint + - cfg-cookiecutter-tox-yoga + - cfg-cookiecutter-tox-zed + - cfg-cookiecutter-tox-antelope periodic-daily: jobs: - ansible-lint - flake8 - hadolint - yamllint + - cfg-cookiecutter-tox-yoga + - cfg-cookiecutter-tox-zed + - cfg-cookiecutter-tox-antelope diff --git a/tox.ini b/tox.ini index 878efa4..8450716 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,10 @@ skipsdist = true envlist = py3 [testenv] +passenv = OPENSTACK_VERSION deps = -rrequirements.txt +[testenv:cookiecutter] commands = - cookiecutter --no-input . + cookiecutter --no-input . openstack_version={env:OPENSTACK_VERSION}