Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests - massive test refactor #106

Merged
merged 138 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 134 commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
5d925da
add integration requirements.txt
briantist Jun 27, 2021
e0e23ba
move some unneeded stuff temporarily
briantist Jun 27, 2021
366953e
Move existing tests into correct level
briantist Jun 27, 2021
13d0bbd
add setup target for downloading vault
briantist Jun 29, 2021
3e23b1f
add setup targets for cert mgmt
briantist Jun 29, 2021
5ca5c78
move vault server setup to setup target
briantist Jun 29, 2021
5539715
add a localenv setup target docker
briantist Jun 29, 2021
daeb80f
gha tidbit
briantist Jun 30, 2021
90599bf
try out macos?
briantist Jun 30, 2021
1ae0984
matrix runner?
briantist Jun 30, 2021
62e55bd
fix hyphen/dash
briantist Jun 30, 2021
719e90f
woop
briantist Jun 30, 2021
2e7f1ab
boot2docker yay
briantist Jun 30, 2021
346eed0
fix conditional
briantist Jun 30, 2021
dd6aca7
right sed fred
briantist Jun 30, 2021
96da4fb
don't tr -d on me
briantist Jun 30, 2021
9742c1d
housekeeping
briantist Jul 1, 2021
733e038
add localenv setup for github actions
briantist Jul 1, 2021
d7a610c
try out service containers
briantist Jul 1, 2021
8820612
fix dumb workflow syntax
briantist Jul 1, 2021
0595013
abs path
briantist Jul 1, 2021
4157338
ugh wth
briantist Jul 1, 2021
7eaa1f0
cols paff
briantist Jul 1, 2021
4b36155
pip pip, hooray?
briantist Jul 1, 2021
2a0f19a
err errday
briantist Jul 1, 2021
965e7b4
need six too?
briantist Jul 1, 2021
5a161aa
and docker-compose
briantist Jul 1, 2021
75b5cc1
more path fun!
briantist Jul 1, 2021
0e399cc
paths, as far as the eye can see!
briantist Jul 1, 2021
20b7e2b
netwerkz
briantist Jul 1, 2021
247f5b2
poopiters legacy
briantist Jul 1, 2021
466e872
whats goin on
briantist Jul 3, 2021
e76c1fb
fixee
briantist Jul 3, 2021
091090d
paths.. of course
briantist Jul 3, 2021
9a17a2d
verz
briantist Jul 3, 2021
5d9c33c
pathHHHSSSS
briantist Jul 3, 2021
ce2c54d
the locals
briantist Jul 3, 2021
384107e
work it, directory
briantist Jul 3, 2021
825f9a6
destroy! whats the diff
briantist Jul 3, 2021
b872a56
add easyenv action
briantist Jul 3, 2021
07263e5
hmm
briantist Jul 3, 2021
e752322
duh
briantist Jul 3, 2021
d1efacd
action path
briantist Jul 3, 2021
0329b51
ok
briantist Jul 4, 2021
cf4d948
ooof
briantist Jul 4, 2021
16aad32
nope
briantist Jul 4, 2021
cf53c49
uneasy env
briantist Jul 4, 2021
6658fc5
trying
briantist Jul 4, 2021
539eca4
and now
briantist Jul 4, 2021
2100101
-ezenvA
briantist Jul 4, 2021
c6536de
use v1
briantist Jul 4, 2021
b2aaa1b
😏
briantist Jul 4, 2021
1ce06d4
squeakle
briantist Jul 4, 2021
f63a591
rework
briantist Jul 5, 2021
748dd4d
docker none
briantist Jul 5, 2021
18bb3e0
use gha
briantist Jul 5, 2021
e3144e9
try to get local working i guess
briantist Jul 5, 2021
3ef29f3
oop
briantist Jul 5, 2021
9896b49
fixmemememe
briantist Jul 5, 2021
b1da5f7
env
briantist Jul 5, 2021
8f0a725
macoses
briantist Jul 5, 2021
8cca271
retries
briantist Jul 5, 2021
1c44a33
cg macos
briantist Jul 5, 2021
83bd614
fixyfixy
briantist Jul 6, 2021
b44a9d3
do the thing
briantist Jul 6, 2021
eef7bf3
limits
briantist Jul 6, 2021
6b28ac9
softly
briantist Jul 6, 2021
b932cbe
wot now
briantist Jul 6, 2021
1dab2b9
two88tho
briantist Jul 6, 2021
e9d7ffd
what now
briantist Jul 6, 2021
d1324d6
oops
briantist Jul 6, 2021
220c433
fork safety
briantist Jul 6, 2021
0ae2cdd
dress for succeeded
briantist Jul 6, 2021
a5bb68b
move tinyproxy to its own setup role
briantist Jul 8, 2021
730dc57
speed up unzip when it doesn\'t need to be installed
briantist Jul 8, 2021
62a1321
more docker role cleanup
briantist Jul 8, 2021
30d0be7
more fixups, gha cleanup
briantist Jul 8, 2021
3ce6825
localenv workflows
briantist Jul 8, 2021
2c9b995
welp
briantist Jul 8, 2021
0b08546
ummmm
briantist Jul 8, 2021
03f912c
matrix include is tricky
briantist Jul 8, 2021
6348820
wrong path
briantist Jul 8, 2021
4970896
covz
briantist Jul 8, 2021
bf7a6b7
pip3dake
briantist Jul 8, 2021
69db78b
1 more cov?
briantist Jul 8, 2021
a675465
no cov for local/venv
briantist Jul 8, 2021
091c898
buttoning up
briantist Jul 8, 2021
a1a8ede
files!files!files!
briantist Jul 8, 2021
f1a3851
paths are the death of me
briantist Jul 8, 2021
4daccb9
community.docker req
briantist Jul 8, 2021
257b6ca
requirements!
briantist Jul 8, 2021
27c1196
more cleanup and fixes
briantist Jul 8, 2021
1e54a06
macos has old ass bash
briantist Jul 8, 2021
b12a5f9
move collection installs into action
briantist Jul 8, 2021
4cecf7e
more fricken path bs
briantist Jul 8, 2021
8068707
real dumb one, this one, meaning me
briantist Jul 8, 2021
8de52fb
Add action for macos docker setup
briantist Jul 8, 2021
7152ae0
reversing course on collections path... path... path... ptha.. phthth…
briantist Jul 8, 2021
c471edb
more tweaks
briantist Jul 9, 2021
283dd66
errant )
briantist Jul 9, 2021
67d4147
integration_config cleanup
briantist Jul 9, 2021
2c4768e
add READMEs for setup roles
briantist Jul 9, 2021
87b92cd
setup_vault_server cleanup
briantist Jul 9, 2021
d9cf901
setup_tinyproxy_server cleanup
briantist Jul 9, 2021
40d104d
tidying up
briantist Jul 9, 2021
6a5fec6
move test plugins into dedicated target
briantist Jul 11, 2021
1b33d15
Move legacy logic to dedicated setup target
briantist Jul 11, 2021
0af2fa2
split macos docker tasks
briantist Jul 11, 2021
6276a65
fix macos legacy docker
briantist Jul 11, 2021
1c7589b
better job name?
briantist Jul 11, 2021
b81061f
correction
briantist Jul 11, 2021
5c49899
name tweak
briantist Jul 11, 2021
d06e77f
cleanup workflow
briantist Jul 11, 2021
bce6636
try ubuntu2004 for local integration
briantist Jul 11, 2021
b1bda0a
go back to default container
briantist Jul 11, 2021
d9959e7
more cleanup
briantist Jul 11, 2021
249b93e
New docs guides
briantist Jul 12, 2021
48b4d02
remove unused variables
briantist Jul 12, 2021
1d94e72
add vault_version detail
briantist Jul 12, 2021
3c112e7
typos and doc fixups
briantist Jul 14, 2021
a22b16d
restore Vault 1.7.3 tests
briantist Jul 15, 2021
068aa0a
forgot to use vault version from matrix!
briantist Jul 15, 2021
06296b5
fix rst formatting
briantist Jul 16, 2021
e93a2f5
Update docs/docsite/rst/contributor_guide.rst
briantist Jul 16, 2021
12ff442
contributor guide updates
briantist Jul 17, 2021
c3a0278
user guide formatting fixes
briantist Jul 17, 2021
11d5d32
more unique anchors
briantist Jul 17, 2021
6aea499
localenv formatting
briantist Jul 17, 2021
1440af4
Sentence case
briantist Jul 17, 2021
b2f1305
Merge branch 'main' into tests/breakup
briantist Jul 19, 2021
6143c4d
bash -> shell-session
briantist Jul 19, 2021
aed642c
Apply suggestions from code review
briantist Jul 19, 2021
326715b
docs fixes from review feedback
briantist Jul 19, 2021
d6a8cf5
missed a spot
briantist Jul 19, 2021
0564f3f
update retry warnings header
briantist Jul 20, 2021
71c5e0f
errant codecov@v1 from main merge conflict
briantist Jul 20, 2021
fc18cd1
README update for contributors
briantist Jul 20, 2021
799d195
Apply suggestions from code review
briantist Jul 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/actions/collection-via-git/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Ansible Collection via GitHub
description: Install Ansible collections direct from GitHub repositories without using ansible-galaxy.
branding:
icon: git-branch
color: yellow
inputs:
collection:
description: The name of the collection in namespace.collection_name form.
required: true
ref:
description: The git ref to install. Defaults to the latest release as listed in GitHub releases. Only supports branches and tags.
required: false
path:
description: The path to clone it to. Defaults to ansible_collections/namespace/collection_name.
required: false
runs:
using: composite
steps:
- shell: bash
run: |
COLLECTION="${{ inputs.collection }}"
P_PATH="${{ inputs.path }}"
P_REF="${{ inputs.ref }}"

NS="${COLLECTION%.*}"
CN="${COLLECTION#*.}"

# only collections in the ansible-collections organization are supported right now
URLBASE="https://github.com/ansible-collections/${COLLECTION}"
URLCLONE="${URLBASE}.git"
URLLATEST="${URLBASE}/releases/latest"

if [[ -n "${P_PATH}" ]]
then
OUTPATH="${P_PATH}"
else
OUTPATH="ansible_collections/${NS}/${CN}"
fi

if [[ -n "${P_REF}" ]]
then
REF="${P_REF}"
else
# credit to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-3294173
latest=$(curl -fs -o/dev/null -w %{redirect_url} "${URLLATEST}")
REF=$(basename ${latest})
fi

git clone --depth=1 --branch "${REF}" "${URLCLONE}" "${OUTPATH}"
18 changes: 18 additions & 0 deletions .github/actions/macos-docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Install Docker on MacOS GitHub Runner
description: Install and configure docker for a MacOS GitHub runner, and export the environment variables.
branding:
icon: command
color: white
runs:
using: composite
steps:
- shell: bash
run: |
mkdir -p ~/.docker/machine/cache
curl -Lo ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v19.03.12/boot2docker.iso
brew install docker-machine docker
docker --version
docker-machine create --driver virtualbox default
docker-machine env default
docker-machine env default | sed 's/^export //;/^#/d;s/^#.*//' | tr -d '"' >> $GITHUB_ENV
221 changes: 149 additions & 72 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# README FIRST
# 1. If you don't have unit tests remove that section
# 2. If your collection depends on other collections ensure they are installed, see "Install collection dependencies"
# If you need help please ask in the #ansible-community channel on Libera.Chat IRC (https://libera.chat/)
# Refer to https://libera.chat/guides/registration to learn how to register

name: CI
on:
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
Expand All @@ -19,6 +13,7 @@ env:
NAMESPACE: community
COLLECTION_NAME: hashi_vault
ANSIBLE_FORCE_COLOR: true
ANSIBLE_COLLECTIONS_PATHS: ${{ github.workspace }}

jobs:

Expand All @@ -29,14 +24,18 @@ jobs:

sanity:
name: Sanity (Ⓐ${{ matrix.ansible }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- ubuntu-latest
test_container:
- default
ansible:
- stable-2.9
- stable-2.10
- stable-2.11
- devel
runs-on: ubuntu-latest
steps:

# ansible-test requires the collection to be in a directory in the form
Expand All @@ -62,16 +61,20 @@ jobs:
# The docker container has all the pinned dependencies that are required
# and all python versions ansible supports.
- name: Run sanity tests
run: ansible-test sanity --docker -v --color
run: ansible-test sanity --docker ${{ matrix.test_container }} -v --color
working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}

units:
runs-on: ubuntu-latest
runs-on: ${{ matrix.runner }}
name: Units (Ⓐ${{ matrix.ansible }})
strategy:
# As soon as the first unit test fails, cancel the others to free up the CI queue
fail-fast: true
matrix:
runner:
- ubuntu-latest
test_container:
- default
ansible:
- stable-2.9
- stable-2.10
Expand All @@ -94,14 +97,9 @@ jobs:
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

# # OPTIONAL If your unit test requires Python libraries from other collections
# # Install them like this
# - name: Install collection dependencies
# run: ansible-galaxy collection install ansible.netcommon ansible.utils -p .

# Run the unit tests
- name: Run unit test
run: ansible-test units -v --color --docker --coverage
run: ansible-test units -v --color --docker ${{ matrix.test_container }} --coverage
working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}

# ansible-test support producing code coverage date
Expand All @@ -119,17 +117,16 @@ jobs:
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html


# If the application you are testing is available as a docker container and you want to test
# multiple versions see the following for an example:
# https://github.com/ansible-collections/community.zabbix/tree/master/.github/workflows

integration:
runs-on: ubuntu-latest
runs-on: ${{ matrix.runner }}
name: I (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }} | Vault ${{ matrix.vault }})
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-latest
test_container:
- default
ansible:
- stable-2.9
- stable-2.10
Expand All @@ -152,91 +149,171 @@ jobs:
- ansible: devel
vault: 1.7.3
python: '3.10'
runner: ubuntu-latest
test_container: default

steps:
- name: Initialize env vars
run: |
COLLECTION_PATH=ansible_collections/${NAMESPACE}/${COLLECTION_NAME}
LOOKUP_HASHI_VAULT_PATH=${COLLECTION_PATH}/tests/integration/targets/lookup_hashi_vault
LOOKUP_HASHI_VAULT_BIN=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/files/bin
LOOKUP_HASHI_VAULT_VARS=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/vars

echo "COLLECTION_PATH=${COLLECTION_PATH}" >> ${GITHUB_ENV}
echo "LOOKUP_HASHI_VAULT_PATH=${LOOKUP_HASHI_VAULT_PATH}" >> ${GITHUB_ENV}
echo "LOOKUP_HASHI_VAULT_BIN=${LOOKUP_HASHI_VAULT_BIN}" >> ${GITHUB_ENV}
echo "LOOKUP_HASHI_VAULT_VARS=${LOOKUP_HASHI_VAULT_VARS}" >> ${GITHUB_ENV}
uses: briantist/ezenv@v1
with:
env: |
COLLECTION_PATH=ansible_collections/${NAMESPACE}/${COLLECTION_NAME}
COLLECTION_INTEGRATION_PATH=${COLLECTION_PATH}/tests/integration
COLLECTION_INTEGRATION_TARGETS=${COLLECTION_INTEGRATION_PATH}/targets
LOOKUP_HASHI_VAULT_PATH=${COLLECTION_INTEGRATION_TARGETS}/lookup_hashi_vault
LOOKUP_HASHI_VAULT_BIN=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/files/bin
LOOKUP_HASHI_VAULT_VARS=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/vars

- name: Check out code
uses: actions/checkout@v2
with:
path: ${{ env.COLLECTION_PATH }}

- name: Link to .github # easier access to local actions
run: ln -s "${COLLECTION_PATH}/.github" .github

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Cache for vault binaries
id: cache-vault
uses: actions/cache@v2
with:
path: ${{ env.LOOKUP_HASHI_VAULT_BIN }}
key: ${{ runner.os }}-vault${{ matrix.vault }} # future: include version/arch when configurable

# removing .gitignore lets the files in those dirs be sent to the container via ansible-test
# the files/bin dir will contain the vault binary downloaded a few steps later (or retrieved from cache)
# the vars/ dir will be used to write a file overriding role defaults (for Vault version)
- name: Prepare for Vault version and caching
run: |
rm -f "${LOOKUP_HASHI_VAULT_BIN}/.gitignore"
rm -f "${LOOKUP_HASHI_VAULT_VARS}/.gitignore"
echo '{ "vault_version": "${{ matrix.vault }}" }' > "${LOOKUP_HASHI_VAULT_VARS}/main.json"

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

#TODO: remove dependency on community.crypto
- name: Find the latest version of community.crypto
- name: Prepare docker dependencies
run: ./setup.sh -e vault_version=${{ matrix.vault }}
working-directory: ${{ env.COLLECTION_INTEGRATION_TARGETS }}/setup_localenv_gha

- name: Run integration test
run: |
# credit to https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-3294173
ansible-test integration -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --docker ${{ matrix.test_container }} --coverage --docker-network hashi_vault_default
working-directory: ${{ env.COLLECTION_PATH }}

cclu=$(curl -fs -o/dev/null -w %{redirect_url} https://github.com/ansible-collections/community.crypto/releases/latest)
echo "CC_LATEST=$(basename ${cclu})" >> $GITHUB_ENV
# ansible-test support producing code coverage date
- name: Generate coverage report
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ${{ env.COLLECTION_PATH }}

- name: Cache for community.crypto
id: cache-cc
uses: actions/cache@v2
# See the reports at https://codecov.io/gh/ansible-collections/community.hashi_vault
- uses: codecov/codecov-action@v1
with:
path: ansible_collections/community/crypto
key: collection-community.crypto-${{ env.CC_LATEST }}
fail_ci_if_error: false

- name: Install collection dependencies
if: steps.cache-cc.outputs.cache-hit != 'true'
local_test_invocation:
runs-on: ${{ matrix.runner }}
name: LI - ${{ matrix.runner }} [${{ matrix.docker && '+' || '-' }}d4r] (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
env:
# needed to prevent Ansible crashing on MacOS
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES'
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.11
python:
- 3.8
runner:
- ubuntu-latest
- macos-latest
test_container:
- default
docker:
- true
- false
exclude:
- runner: ubuntu-latest
docker: false

steps:
- name: Initialize env vars
uses: briantist/ezenv@v1
with:
env: |
COLLECTION_PATH=ansible_collections/${NAMESPACE}/${COLLECTION_NAME}
COLLECTION_INTEGRATION_PATH=${COLLECTION_PATH}/tests/integration
COLLECTION_INTEGRATION_TARGETS=${COLLECTION_INTEGRATION_PATH}/targets
LOOKUP_HASHI_VAULT_PATH=${COLLECTION_INTEGRATION_TARGETS}/lookup_hashi_vault
LOOKUP_HASHI_VAULT_BIN=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/files/bin
LOOKUP_HASHI_VAULT_VARS=${LOOKUP_HASHI_VAULT_PATH}/lookup_hashi_vault/vars

- name: Check out code
uses: actions/checkout@v2
with:
repository: ansible-collections/community.crypto
ref: refs/tags/${{ env.CC_LATEST }}
path: ansible_collections/community/crypto
path: ${{ env.COLLECTION_PATH }}

# this will populate files/bin with the selected vault version binary
- name: Pre-download Vault
if: steps.cache-vault.outputs.cache-hit != 'true'
env:
ANSIBLE_ROLES_PATH: ../
working-directory: ${{ env.LOOKUP_HASHI_VAULT_PATH }}/playbooks
run: ansible-playbook "download_vault.yml" -v
- name: Link to .github # easier access to local actions
run: ln -s "${COLLECTION_PATH}/.github" .github

# Run the integration tests
- name: Run integration test
run: ansible-test integration -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Install community.crypto
uses: ./.github/actions/collection-via-git
with:
collection: community.crypto

- name: Install community.docker
uses: ./.github/actions/collection-via-git
with:
collection: community.docker

- name: Install community.general
uses: ./.github/actions/collection-via-git
if: ${{ matrix.runner == 'macos-latest' }} # we need community.general.homebrew
with:
collection: community.general

- name: legacy integration - use sample integration_config
working-directory: ${{ env.COLLECTION_INTEGRATION_PATH }}
run: cp "integration_config.yml.sample" "integration_config.yml"

- name: legacy integration - venv
if: ${{ matrix.runner != 'macos-latest' || !matrix.docker }}
run: ansible-test integration -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --venv --requirements --allow-destructive #--coverage
working-directory: ${{ env.COLLECTION_PATH }}

- name: Install Docker on MacOS
if: ${{ matrix.runner == 'macos-latest' && matrix.docker }}
uses: ./.github/actions/macos-docker

- name: legacy integration - docker
if: ${{ matrix.docker }}
run: |
ansible-test integration -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --docker ${{ matrix.test_container }} --coverage
working-directory: ${{ env.COLLECTION_PATH }}

- name: legacy integration - remove integration_config
if: ${{ matrix.docker }}
working-directory: ${{ env.COLLECTION_INTEGRATION_PATH }}
run: rm -f "integration_config.yml"

- name: localenv_docker - setup
if: ${{ matrix.docker }}
run: |
pwd
pip install -r files/requirements/requirements.txt -c files/requirements/constraints.txt
./setup.sh
working-directory: ${{ env.COLLECTION_INTEGRATION_TARGETS }}/setup_localenv_docker

- name: localenv_docker - Run integration test (in docker)
if: ${{ matrix.docker }}
run: |
ansible-test integration -v --color --retry-on-error --continue-on-error --python ${{ matrix.python }} --docker ${{ matrix.test_container }} --coverage --docker-network hashi_vault_default
working-directory: ${{ env.COLLECTION_PATH }}

# ansible-test support producing code coverage date
- name: Generate coverage report
if: ${{ matrix.docker }}
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ${{ env.COLLECTION_PATH }}

# See the reports at https://codecov.io/gh/ansible-collections/community.hashi_vault
- uses: codecov/codecov-action@v2
if: ${{ matrix.docker }}
with:
fail_ci_if_error: false
Loading