Bump ansible-core v2.14 #68
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: ansible-tests | |
on: | |
pull_request: | |
branches: | |
- "main" | |
env: | |
PYTHON_VERSION: "3.10" | |
# arbitrarily choosing the latest stable version to run ansible-test units | |
# running 'ansible-test units' for each ansible+python version isn't necessary | |
ANSIBLE_FOR_UNIT_TESTS: "2.15" | |
# defines where ansible will look for the collection | |
# must be a sub-directory of ansible_collections/ | |
COLLECTION_PATH: ansible_collections/onepassword/connect | |
jobs: | |
ansible-sanity: | |
name: Ansible Sanity Test (v${{ matrix.ansible }}, py${{ matrix.python }}) | |
strategy: | |
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix | |
matrix: | |
ansible: ["2.14", "2.15", "2.16"] | |
python: ["3.8", "3.9", "3.10", "3.11"] | |
exclude: | |
- ansible: "2.14" | |
python: "3.8" | |
- ansible: "2.15" | |
python: "3.8" | |
- ansible: "2.16" | |
python: "3.8" | |
- ansible: "2.16" | |
python: "3.9" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.COLLECTION_PATH }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.COLLECTION_PATH }} | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install ansible-core stable-${{ matrix.ansible }} | |
run: | | |
pip install \ | |
https://github.com/ansible/ansible/archive/stable-${{ matrix.ansible }}.tar.gz \ | |
--disable-pip-version-check | |
# running with docker-in-docker | |
# the installed ansible-test command will know which container to use | |
# for each ansible version | |
- name: Run ansible-test sanity (v${{ matrix.ansible }}, python${{ matrix.python }}) | |
run: ansible-test sanity -v --docker --redact --python ${{ matrix.python }} | |
ansible-units: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.COLLECTION_PATH }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.COLLECTION_PATH }} | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{env.PYTHON_VERSION}} | |
- name: Install ansible-core stable-${{ env.ANSIBLE_FOR_UNIT_TESTS }} | |
run: pip install https://github.com/ansible/ansible/archive/stable-${{ env.ANSIBLE_FOR_UNIT_TESTS }}.tar.gz --disable-pip-version-check | |
- name: Run ansible-test units | |
run: ansible-test units -v --docker --redact --python ${{ env.PYTHON_VERSION }} | |
ansible-lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ env.COLLECTION_PATH }} | |
steps: | |
- name: run-ansible-lint | |
uses: ansible/ansible-lint@v6.22.0 |