Skip to content

test: fix use plan with >=2c for gitlab app #150

test: fix use plan with >=2c for gitlab app

test: fix use plan with >=2c for gitlab app #150

Workflow file for this run

---
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