Skip to content

CI: update tested versions #519

CI: update tested versions

CI: update tested versions #519

Workflow file for this run

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:
matrix:
python_version:
- 3.13
ansible_version:
- stable-2.18
- devel
include:
- ansible_version: stable-2.17
python_version: 3.12
- ansible_version: stable-2.16
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 }}