Sanity Checks #254
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: Sanity Checks | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
schedule: | |
- cron: '0 14 * * 1-5' | |
env: | |
NAMESPACE: zscaler | |
COLLECTION_NAME: ziacloud | |
PYTHON_VERSION: 3.8 | |
jobs: | |
## Sanity is required: | |
# | |
# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html | |
sanity: | |
name: Sanity (Ⓐ${{ matrix.ansible }}) | |
strategy: | |
matrix: | |
include: | |
- ansible: "2.14" | |
python_ver: "3.11" | |
- ansible: "2.15" | |
python_ver: "3.11" | |
- ansible: "2.16" | |
python_ver: "3.11" | |
- ansible: "2.17" | |
python_ver: "3.11" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: ./ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_ver }} | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v9 | |
# Install the head of the given branch (devel, stable-2.10) | |
- name: Install ansible-base (${{ matrix.ansible }}) | |
run: poetry run pip install https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz --disable-pip-version-check | |
- name: Create lock file | |
run: poetry lock | |
- name: Install dependencies | |
run: poetry install | |
- name: Run sanity tests | |
timeout-minutes: 8 | |
run: poetry run make new-sanity |