diff --git a/.github/workflows/ansible-test-plugins.yml b/.github/workflows/ansible-test-plugins.yml index 241085f..b6a9abe 100644 --- a/.github/workflows/ansible-test-plugins.yml +++ b/.github/workflows/ansible-test-plugins.yml @@ -13,6 +13,10 @@ on: schedule: - cron: '0 6 * * *' +env: + clickhouse_version_file: "./ansible_collections/community/clickhouse/tests/integration/targets/setup_clickhouse/vars/main.yml" + clickhouse_test_info_file: "./ansible_collections/community/clickhouse/tests/integration/targets/clickhouse_info/tasks/initial.yml" + jobs: sanity: name: "Sanity (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }})" @@ -97,6 +101,10 @@ jobs: #- stable-2.15 #- stable-2.16 #- devel + clickhouse: + - 21.8.15.7 + - 22.8.9.24 + - 23.8.9.54 python: - "3.10" steps: @@ -114,6 +122,13 @@ jobs: - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + - name: Set Clickhouse version (${{ matrix.clickhouse }}) + run: "sed -i 's/^clickhouse_version:.*/clickhouse_version: \"${{ matrix.clickhouse }}\"/g' ${{ env.clickhouse_version_file }}" + + - name: Set Clickhouse version (${{ matrix.clickhouse }}) + run: "sed -i 's/test_shard_localhost/default/g' ${{ env.clickhouse_test_info_file }}" + if: ${{ matrix.clickhouse == '23.8.9.54' }} + - name: Run integration tests run: ansible-test integration --docker ubuntu2204 -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --diff --coverage working-directory: ./ansible_collections/community/clickhouse diff --git a/tests/integration/targets/setup_clickhouse/tasks/install.yml b/tests/integration/targets/setup_clickhouse/tasks/install.yml index c9bfc69..2071308 100644 --- a/tests/integration/targets/setup_clickhouse/tasks/install.yml +++ b/tests/integration/targets/setup_clickhouse/tasks/install.yml @@ -24,9 +24,9 @@ - name: Install clickhouse ansible.builtin.apt: name: - - "clickhouse-server={{ server_version }}" - - "clickhouse-client={{ server_version }}" - - "clickhouse-common-static={{ server_version }}" + - "clickhouse-server={{ clickhouse_version }}" + - "clickhouse-client={{ clickhouse_version }}" + - "clickhouse-common-static={{ clickhouse_version }}" state: present - name: Copy settings for default user diff --git a/tests/integration/targets/setup_clickhouse/vars/main.yml b/tests/integration/targets/setup_clickhouse/vars/main.yml index 9328c29..7156ec0 100644 --- a/tests/integration/targets/setup_clickhouse/vars/main.yml +++ b/tests/integration/targets/setup_clickhouse/vars/main.yml @@ -1 +1 @@ -server_version: 21.8.15.7 +clickhouse_version: 21.8.15.7