Everpure Ansible CI #3666
This file contains hidden or 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: Everpure Ansible CI | |
| "on": | |
| pull_request: | |
| push: | |
| schedule: | |
| - cron: '25 10 * * *' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build flashblade on Ansible ${{ matrix.ansible }} (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| ansible: | |
| - stable-2.16 | |
| - stable-2.17 | |
| - stable-2.18 | |
| - stable-2.19 | |
| - stable-2.20 | |
| - devel | |
| python-version: | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| exclude: | |
| - python-version: "3.14" | |
| ansible: stable-2.16 | |
| - python-version: "3.14" | |
| ansible: stable-2.17 | |
| - python-version: "3.14" | |
| ansible: stable-2.18 | |
| - python-version: "3.14" | |
| ansible: stable-2.19 | |
| - python-version: "3.13" | |
| ansible: stable-2.16 | |
| - python-version: "3.13" | |
| ansible: stable-2.17 | |
| - python-version: "3.12" | |
| ansible: devel | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check | |
| - name: Run sanity tests | |
| run: | | |
| pwd | |
| mkdir -p ansible_collections/purestorage/flashblade | |
| rsync -av . ansible_collections/purestorage/flashblade --exclude ansible_collection/purestorage/flashblade | |
| cd ansible_collections/purestorage/flashblade | |
| ansible-test sanity -v --color --python ${{ matrix.python-version }} --docker | |
| unit-tests: | |
| name: Unit Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r tests/requirements.txt | |
| - name: Run unit tests with coverage | |
| run: | | |
| pytest --cov=plugins --cov-report=html --cov-report=xml --cov-report=term -v | |
| - name: Upload coverage report (HTML) | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-html | |
| path: htmlcov/ | |
| - name: Upload coverage report (XML) | |
| if: matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-xml | |
| path: coverage.xml | |
| - name: Display coverage summary | |
| run: | | |
| echo "## Test Coverage Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| coverage report >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |