CI: update tested versions #521
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-test | |
on: | |
push: | |
pull_request: | |
env: | |
COLL_NS: flowerysong | |
COLL_NAME: melange | |
ANSIBLE_COLLECTIONS_PATH: ${{ github.workspace }} | |
jobs: | |
build_collection: | |
name: build collection | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install 'git+https://github.com/ansible/[email protected]#egg=ansible-core' | |
- name: Build collection | |
run: ansible-galaxy collection build -vv | |
- name: Upload collection | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.COLL_NS }}-${{ env.COLL_NAME }}-*.tar.gz | |
name: ${{ env.COLL_NS }}-${{ env.COLL_NAME }} | |
static_analysis: | |
needs: build_collection | |
name: static analysis (${{ matrix.ansible_version }}, py${{ matrix.python_version }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
python_version: | |
- 3.13 | |
ansible_version: | |
- stable-2.18 | |
- devel | |
include: | |
- ansible_version: stable-2.17 | |
python_version: 3.12 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install 'git+https://github.com/ansible/ansible@${{ matrix.ansible_version }}#egg=ansible-core' pycodestyle pylint pyyaml voluptuous yamllint junit-xml | |
- name: Download collection | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.COLL_NS }}-${{ env.COLL_NAME }} | |
- name: Install collection | |
run: ansible-galaxy collection install ${{ env.COLL_NS }}-${{ env.COLL_NAME }}-*.tar.gz | |
- name: Run tests | |
run: ansible-test sanity -v --color --docker | |
working-directory: ./ansible_collections/${{ env.COLL_NS }}/${{ env.COLL_NAME }} |