You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.9 KiB
96 lines
2.9 KiB
name: Plugins CI |
|
on: |
|
push: |
|
paths: |
|
- 'plugins/**' |
|
- 'tests/**' |
|
- '.github/workflows/ansible-test-plugins.yml' |
|
pull_request: |
|
paths: |
|
- 'plugins/**' |
|
- 'tests/**' |
|
- '.github/workflows/ansible-test-plugins.yml' |
|
schedule: |
|
- cron: '0 6 * * *' |
|
|
|
|
|
env: |
|
proxysql_version_file: "./ansible_collections/community/proxysql/tests/integration/targets/setup_proxysql/defaults/main.yml" |
|
|
|
jobs: |
|
sanity: |
|
name: "Sanity (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }})" |
|
runs-on: ubuntu-latest |
|
strategy: |
|
matrix: |
|
ansible: |
|
- stable-2.9 |
|
- stable-2.10 |
|
- stable-2.11 |
|
- devel |
|
steps: |
|
|
|
- name: Check out code |
|
uses: actions/checkout@v2 |
|
with: |
|
path: ansible_collections/community/proxysql |
|
|
|
- name: Set up Python |
|
uses: actions/setup-python@v2 |
|
with: |
|
python-version: 3.8 |
|
|
|
- name: Install ansible-base (${{ matrix.ansible }}) |
|
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check |
|
|
|
- name: Run sanity tests |
|
run: ansible-test sanity --docker -v --color |
|
working-directory: ./ansible_collections/community/proxysql |
|
|
|
integration: |
|
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, ProxySQL: ${{ matrix.proxysql }})" |
|
runs-on: ubuntu-latest |
|
strategy: |
|
fail-fast: false |
|
matrix: |
|
proxysql: |
|
- 2.0.12 |
|
ansible: |
|
- stable-2.9 |
|
- stable-2.10 |
|
- stable-2.11 |
|
- devel |
|
python: |
|
- 3.6 |
|
steps: |
|
|
|
- name: Check out code |
|
uses: actions/checkout@v2 |
|
with: |
|
path: ansible_collections/community/proxysql |
|
|
|
- name: Set up Python |
|
uses: actions/setup-python@v2 |
|
with: |
|
python-version: 3.8 |
|
|
|
- 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 ProxySQL version (${{ matrix.proxysql }}) |
|
run: "sed -i 's/^proxysql_version:.*/proxysql_version: \"${{ matrix.proxysql }}\"/g' ${{ env.proxysql_version_file }}" |
|
|
|
- name: install python3-apt to detect of proxysql is already available |
|
run: apt install python3-apt -y |
|
|
|
- name: Run integration tests |
|
run: ansible-test integration --docker -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --diff --coverage |
|
working-directory: ./ansible_collections/community/proxysql |
|
|
|
- name: Generate coverage report. |
|
run: ansible-test coverage xml -v --requirements --group-by command --group-by version |
|
working-directory: ./ansible_collections/community/proxysql |
|
|
|
- uses: codecov/codecov-action@v1 |
|
with: |
|
fail_ci_if_error: false
|
|
|