Skip to content

OV 9.3 Validation #1168

OV 9.3 Validation

OV 9.3 Validation #1168

Workflow file for this run

name: CI
on:
- pull_request
jobs:
sanity:
strategy:
matrix:
python_version: ["3.9", "3.10"]
ansible_version: ["stable-2.15"]
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/hpe/oneview
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install future
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install ansible ${{ matrix.ansible_version }}
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
- name: Install ansible_collections.hpe.oneview
run: ansible-galaxy collection install hpe.oneview -p ../../
- name: Run sanity tests
run: ansible-test sanity --docker -v --color --python ${{ matrix.python_version }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: ansible_collections/hpe/oneview
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@main
with:
path: "./"
units:
runs-on: ubuntu-20.04
strategy:
# As soon as the first unit test fails, cancel the others to free up the CI queue
fail-fast: true
matrix:
python_version:
- 3.9
- '3.10'
ansible:
- stable-2.15
steps:
- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/hpe/oneview
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install future pytest-cov
if [ -f tests/requirements.txt ]; then pip3 install -r tests/requirements.txt; fi
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Setting Python env path
run: |
echo "PYTHONPATH=/home/runner/work/oneview-ansible-collection:$PYTHONPATH" >> $GITHUB_ENV
- name: Generating coverage report
run: pytest --cov-report xml --cov=plugins/modules tests/unit/
- name: "Upload coverage to Codecov"
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: alisha-k-kalladassery/oneview-ansible-collection
fail_ci_if_error: true