mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v1...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
245 lines
7.3 KiB
YAML
245 lines
7.3 KiB
YAML
name: Test connection plugins
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.github/workflows/connections_tests.yml'
|
|
- 'ci/*.yml'
|
|
- 'ci/playbooks/connections/**'
|
|
- 'ci/run_connection_test.sh'
|
|
- 'plugins/connection/**'
|
|
- 'tests/integration/targets/connection/**'
|
|
- 'tests/integration/targets/connection_*/**'
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/connections_tests.yml'
|
|
- 'ci/*.yml'
|
|
- 'ci/playbooks/connections/**'
|
|
- 'ci/run_connection_test.sh'
|
|
- 'plugins/connection/**'
|
|
- 'tests/integration/targets/connection/**'
|
|
- 'tests/integration/targets/connection_*/**'
|
|
schedule:
|
|
- cron: 3 0 * * * # Run daily at 0:03 UTC
|
|
|
|
jobs:
|
|
build-collection-artifact-connection-tests:
|
|
name: Build artifact
|
|
runs-on: ${{ matrix.runner-os }}
|
|
strategy:
|
|
matrix:
|
|
runner-os:
|
|
- ubuntu-22.04
|
|
ansible-version:
|
|
- git+https://github.com/ansible/ansible.git@stable-2.13
|
|
runner-python-version:
|
|
- 3.8
|
|
steps:
|
|
- name: Check out ${{ github.repository }} on disk
|
|
uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.runner-python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.runner-python-version }}
|
|
- name: Set up pip cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
- name: Install Ansible ${{ matrix.ansible-version }}
|
|
run: >-
|
|
python -m pip install --user '${{ matrix.ansible-version }}'
|
|
- name: Build a collection tarball
|
|
run: >-
|
|
~/.local/bin/ansible-galaxy collection build --output-path
|
|
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
|
|
- name: Store migrated collection artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: collection
|
|
path: .cache/collection-tarballs
|
|
|
|
test-podman-connection:
|
|
name: Podman connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
|
|
needs:
|
|
- build-collection-artifact-connection-tests
|
|
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
ansible-version:
|
|
- ansible<2.10
|
|
- git+https://github.com/ansible/ansible.git@stable-2.13
|
|
- git+https://github.com/ansible/ansible.git@devel
|
|
os:
|
|
- ubuntu-22.04
|
|
#- ubuntu-22.04
|
|
#- ubuntu-16.04
|
|
#- macos-latest
|
|
python-version:
|
|
#- 3.8
|
|
- 3.9
|
|
#- 3.6
|
|
#- 3.5
|
|
#- 2.7
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Upgrade pip and display Python and PIP versions
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -V
|
|
pip --version
|
|
|
|
- name: Set up pip cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install Ansible ${{ matrix.ansible-version }}
|
|
run: python -m pip install --user '${{ matrix.ansible-version }}'
|
|
|
|
- name: Download migrated collection artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: collection
|
|
path: .cache/collection-tarballs
|
|
|
|
- name: Install the collection tarball
|
|
run: >-
|
|
~/.local/bin/ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
|
|
|
|
- name: Run collection tests for connection
|
|
run: |
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
|
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
|
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
|
fi
|
|
|
|
echo $ANSIBLE_CONFIG
|
|
command -v ansible-playbook
|
|
pip --version
|
|
python --version
|
|
ansible-playbook --version
|
|
|
|
ansible-playbook -vv ci/playbooks/pre.yml \
|
|
-e host=localhost \
|
|
-i localhost, \
|
|
-e ansible_connection=local \
|
|
-e setup_python=false
|
|
|
|
ROOT= ./ci/run_connection_test.sh podman
|
|
ROOT=true ./ci/run_connection_test.sh podman
|
|
shell: bash
|
|
|
|
test-buildah-connection:
|
|
name: Buildah connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
|
|
needs:
|
|
- build-collection-artifact-connection-tests
|
|
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
ansible-version:
|
|
- ansible<2.10
|
|
- git+https://github.com/ansible/ansible.git@stable-2.13
|
|
- git+https://github.com/ansible/ansible.git@devel
|
|
os:
|
|
- ubuntu-22.04
|
|
#- ubuntu-22.04
|
|
#- ubuntu-16.04
|
|
#- macos-latest
|
|
python-version:
|
|
#- 3.8
|
|
- 3.9
|
|
#- 3.6
|
|
#- 3.5
|
|
#- 2.7
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Upgrade pip and display Python and PIP versions
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -V
|
|
pip --version
|
|
|
|
- name: Set up pip cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install Ansible ${{ matrix.ansible-version }}
|
|
run: python -m pip install --user '${{ matrix.ansible-version }}'
|
|
|
|
- name: Download migrated collection artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: collection
|
|
path: .cache/collection-tarballs
|
|
|
|
- name: Install the collection tarball
|
|
run: >-
|
|
~/.local/bin/ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
|
|
|
|
- name: Run collection tests for connection
|
|
run: |
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
|
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
|
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
|
fi
|
|
|
|
echo $ANSIBLE_CONFIG
|
|
command -v ansible-playbook
|
|
pip --version
|
|
python --version
|
|
ansible-playbook --version
|
|
|
|
ansible-playbook -vv ci/playbooks/pre.yml \
|
|
-e host=localhost \
|
|
-i localhost, \
|
|
-e ansible_connection=local \
|
|
-e setup_python=false
|
|
|
|
ROOT= ./ci/run_connection_test.sh buildah
|
|
ROOT=true ./ci/run_connection_test.sh buildah
|
|
shell: bash
|