Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
jobs:
test-tox:
lint:
runs-on: "ubuntu-latest"
steps:
- name: "Check out code"
Expand All @@ -19,29 +19,7 @@ jobs:
- name: "Test with tox"
run: |
tox -e gitlint
tox

test-tf:
runs-on: "ubuntu-latest"
steps:
- name: "Check out code"
uses: "actions/checkout@v6"
- name: "Set up OpenTofu"
uses: "opentofu/setup-opentofu@v1"
with:
tofu_version: "${{ matrix.tofu_version }}"
- name: "Test configuration"
run: |
tofu version
tofu -chdir=tf init
tofu -chdir=tf validate
strategy:
fail-fast: true
matrix:
tofu_version:
- "1.11"
- "1.10"
- "1.9"
tox -e yamllint,markdownlint

name: build

Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
jobs:
test-ansible:
runs-on: "ubuntu-latest"
steps:
- name: "Check out code"
uses: "actions/checkout@v6"
with:
# Checkout a pull request's HEAD commit instead of the merge
# commit, so that gitlint lints the correct commit message.
ref: "${{ github.event.pull_request.head.sha }}"
- name: "Set up Python 3.13"
uses: "actions/setup-python@v6"
with:
python-version: "3.13"
- name: "Install Python dependencies"
run: |
pip install tox
- name: "Test with tox"
run: |
tox -e ansible${{ matrix.ansible_version }}-lint
strategy:
fail-fast: true
matrix:
ansible_version:
- "2.20"
- "2.19"
- "2.18"
- "2.16"

test-tf:
runs-on: "ubuntu-latest"
steps:
- name: "Check out code"
uses: "actions/checkout@v6"
- name: "Set up OpenTofu"
uses: "opentofu/setup-opentofu@v1"
with:
tofu_version: "${{ matrix.tofu_version }}"
- name: "Test configuration"
run: |
tofu version
tofu -chdir=tf init
tofu -chdir=tf validate
strategy:
fail-fast: true
matrix:
tofu_version:
- "1.11"
- "1.10"
- "1.9"

name: test

'on':
pull_request: {}
push: {}
11 changes: 9 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ lint:
- tox -e gitlint
- tox -e yamllint,markdownlint

test-tox:
test-ansible:
stage: test
script:
- tox
- "tox -e ansible${VERSION}-lint"
parallel:
matrix:
- VERSION:
- "2.20"
- "2.19"
- "2.18"
- "2.16"

test-tf:
stage: test
Expand Down
44 changes: 44 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,59 @@ commands =
ansible-galaxy collection install -r {toxinidir}/ansible/requirements.yaml
ansible-lint {toxinidir}/ansible/build.yaml {toxinidir}/ansible/teardown.yaml {posargs}

[testenv:ansible{2.16,2.18,2.19,2.20}-lint]
deps =
ansible2.16: ansible-core<2.17
ansible2.18: ansible-core<2.19
ansible2.19: ansible-core<2.20
ansible2.20: ansible-core<2.21
ansible-lint
commands =
ansible-galaxy collection install -r {toxinidir}/ansible/requirements.yaml
ansible-lint {toxinidir}/ansible/build.yaml {toxinidir}/ansible/teardown.yaml {posargs}

[testenv:ansible-playbook]
passenv = OS_*
deps = -r {toxinidir}/ansible/requirements.txt
commands =
ansible-galaxy collection install -r {toxinidir}/ansible/requirements.yaml
ansible-playbook {posargs}

[testenv:ansible{2.16,2.18,2.19,2.20}-playbook-{epoxy,flamingo}]
passenv = OS_*
deps =
ansible2.18: ansible-core<2.19
ansible2.19: ansible-core<2.20
ansible2.20: ansible-core<2.21
epoxy: openstacksdk<4.5
flamingo: openstacksdk<4.8
commands =
ansible-galaxy collection install -r {toxinidir}/ansible/requirements.yaml
ansible-playbook {posargs}

[testenv:ansible{2.16}-playbook-{caracal}]
passenv = OS_*
deps =
ansible2.16: ansible-core<2.17
caracal: openstacksdk<3.1
commands =
ansible-galaxy collection install -r {toxinidir}/ansible/requirements.yaml
ansible-playbook {posargs}

[testenv:openstack]
passenv = OS_*
deps = -r {toxinidir}/heat/requirements.txt
commands =
openstack {posargs}

[testenv:openstack-{caracal,epoxy,flamingo}]
passenv = OS_*
deps =
caracal: python-openstackclient<7.0
caracal: python-heatclient<4.0
epoxy: python-openstackclient<8.0
epoxy: python-heatclient<4.3
flamingo: python-openstackclient<8.3
flamingo: python-heatclient<5.0
commands =
openstack {posargs}