Skip to content

Commit

Permalink
Add support for running only the integration tests of changed modules…
Browse files Browse the repository at this point in the history
… - enable for amazon.aws
  • Loading branch information
tremble committed Jul 29, 2021
1 parent c1b537b commit 652fdea
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
5 changes: 5 additions & 0 deletions roles/ansible-test/tasks/init_test_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
ansible_test_options: "{{ ansible_test_options }} --requirements"
when: not ansible_test_collections

- name: Enable --changed
set_fact:
ansible_test_options: "{{ ansible_test_options }} --changed --base-branch {{ ansible_test_base_branch }}"
when: ansible_test_changed_only

- name: Enable coverage commands for unit tests
set_fact:
ansible_test_options: "--coverage"
Expand Down
2 changes: 2 additions & 0 deletions roles/ansible-test/vars/default.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
ansible_test_executable: "ansible-test"
ansible_test_changed_only: false
ansible_test_base_branch: "main"
ansible_test_options: "--diff --no-temp-workdir"
40 changes: 30 additions & 10 deletions zuul.d/project-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,36 @@
- name: github.com/ansible-collections/community.aws
- name: github.com/ansible-collections/community.general
- ansible-test-splitter
- ansible-test-cloud-integration-aws-py36_0
- ansible-test-cloud-integration-aws-py36_1
- ansible-test-cloud-integration-aws-py36_2
- ansible-test-cloud-integration-aws-py36_3
- ansible-test-cloud-integration-aws-py36_4
- ansible-test-cloud-integration-aws-py36_5
- ansible-test-cloud-integration-aws-py36_6
- ansible-test-cloud-integration-aws-py36_7
- ansible-test-cloud-integration-aws-py36_8
- ansible-test-cloud-integration-aws-py36_9
- ansible-test-cloud-integration-aws-py36_0:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_1:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_2:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_3:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_4:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_5:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_6:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_7:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_8:
vars:
ansible_test_changed_only: true
- ansible-test-cloud-integration-aws-py36_9:
vars:
ansible_test_changed_only: true

gate:
jobs:
Expand Down

0 comments on commit 652fdea

Please sign in to comment.