instance: add vpc2 support #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Unit tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
paths: | |
- "plugins/**" | |
- "tests/unit/**" | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
unit-test: | |
name: Unit test Ansible ${{ matrix.ansible }} Py${{ matrix.python }} | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: ansible_collections/vultr/cloud | |
strategy: | |
fail-fast: false | |
matrix: | |
ansible: | |
- stable-2.15 | |
python: | |
- "3.10" | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
path: ansible_collections/vultr/cloud | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install ansible-base (${{ matrix.ansible }}) | |
run: | | |
python -m pip install --upgrade pip | |
pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check | |
- name: Build and install collection | |
run: | | |
ansible-galaxy collection build . | |
ansible-galaxy collection install *.gz | |
- name: Run the tests | |
run: >- | |
ansible-test | |
units | |
--docker | |
-v | |
--color | |
--python ${{ matrix.python }} | |
--coverage | |
- name: Generate coverage report | |
run: >- | |
ansible-test | |
coverage xml | |
-v | |
--requirements | |
--group-by command | |
--group-by version | |
- uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: false |