Run Ansible tests #214
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"] | |
# Run ansible-test nightly | |
schedule: | |
- cron: '0 2 * * *' | |
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 test requirements | |
run: | | |
pip install -U pip | |
pip install -r test_requirements.txt | |
working-directory: ansible_collections/ansible/eda | |
- 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 |