Skip to content

Merge pull request #173 from stackhpc/upload-artifact-v4 #323

Merge pull request #173 from stackhpc/upload-artifact-v4

Merge pull request #173 from stackhpc/upload-artifact-v4 #323

Workflow file for this run

---
name: Tests
# Controls when the action will run.
on:
pull_request:
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: Linting code
run: |
ansible-lint -v --force-color
antsibull-changelog lint
ansible-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v3
with:
path: ansible_collections/stackhpc/cephadm
- name: Install dependencies
working-directory: ansible_collections/stackhpc/cephadm
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: Run ansible-test sanity to download docker images
working-directory: ansible_collections/stackhpc/cephadm
run: |
ansible-test sanity --docker --prime-containers
- name: Run ansible-test sanity
working-directory: ansible_collections/stackhpc/cephadm
run: |
ansible-test sanity --verbose --docker --junit
- name: Run ansible-test units
working-directory: ansible_collections/stackhpc/cephadm
run: |
ansible-test units --verbose --docker --coverage --requirements
ansible-test coverage xml --requirements
ansible-test coverage html --requirements
- name: Print coverage report
working-directory: ansible_collections/stackhpc/cephadm
run: |
ansible-test coverage report
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/tests/output/*/*.xml'
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: ansible_collections/stackhpc/cephadm/tests/output/reports/coverage/