NetApp.storagegrid Ansible Coverage #333
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: NetApp.storagegrid Ansible Coverage | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 6 * * *' | |
jobs: | |
sanity: | |
name: Coverage on StorageGrid | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install ansible stable-2.11 | |
run: pip install https://github.com/ansible/ansible/archive/stable-2.11.tar.gz --disable-pip-version-check | |
- name: Make directory to make ansible-test happy | |
run: | | |
pwd | |
mkdir -p ansible_collections/netapp/storagegrid/ | |
rsync -av . ansible_collections/netapp/storagegrid/ --exclude ansible_collections/netapp/storagegrid/ | |
- name: Run Unit Tests | |
run: ansible-test units --coverage --color --docker --python 3.8 | |
working-directory: ansible_collections/netapp/storagegrid/ | |
# 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: ansible_collections/netapp/storagegrid/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
working-directory: ansible_collections/netapp/storagegrid/ | |
verbose: true |