CA-9156: Add ansible test and linting workflows #9
Workflow file for this run
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: Run Ansible tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
- "3.9" | |
defaults: | |
run: | |
working-directory: ansible_collections/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: ansible_collections/ansible/eda | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install ansible | |
run: python -m pip install ansible | |
- name: Run sanity tests | |
run: ansible-test sanity | |
working-directory: ansible_collections/ansible/eda | |
- name: Run unit tests | |
run: ansible-test units --venv -v --num-workers 1 | |
working-directory: ansible_collections/ansible/eda |