1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Merge pull request #17 from sshnaidm/nextci

Optimize CI
This commit is contained in:
Sergey 2020-04-07 01:35:34 +03:00 committed by GitHub
commit 3473faac77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 66 deletions

View file

@ -8,22 +8,17 @@ on:
jobs:
build-collection-artifact:
name: Build collection
name: Build
runs-on: ${{ matrix.runner-os }}
strategy:
matrix:
runner-os:
- ubuntu-latest
- ubuntu-16.04
ansible-version:
- ansible==2.9.5
- git+https://github.com/ansible/ansible.git@devel
runner-python-version:
- 2.7
- 3.7
exclude:
- runner-os: ubuntu-latest
runner-python-version: 2.7
steps:
- name: Check out ${{ github.repository }} on disk
@ -42,7 +37,7 @@ jobs:
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: >-
python -m pip install --user ${{ matrix.ansible-version }}
python -m pip install --user '${{ matrix.ansible-version }}'
- name: Build a collection tarball
run: >-
~/.local/bin/ansible-galaxy collection build --output-path
@ -54,7 +49,7 @@ jobs:
path: .cache/collection-tarballs
sanity-test-collection-via-containers:
name: Sanity in container via Python ${{ matrix.python-version }}
name: Sanity in container via Py-${{ matrix.python-version }} & ${{ matrix.ansible-version }}
needs:
- build-collection-artifact
runs-on: ${{ matrix.runner-os }}
@ -66,7 +61,7 @@ jobs:
runner-python-version:
- 3.7
ansible-version:
- ansible==2.9.5
- ansible<2.10
- git+https://github.com/ansible/ansible.git@devel
python-version:
- 2.7
@ -87,7 +82,7 @@ jobs:
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: >-
python -m pip install --user ${{ matrix.ansible-version }}
python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
with:
@ -102,57 +97,4 @@ jobs:
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/containers/podman
unit-test-collection-via-containers:
name: Units in container ${{ matrix.container-image }}
needs:
- build-collection-artifact
runs-on: ${{ matrix.runner-os }}
strategy:
fail-fast: false
matrix:
runner-os:
- ubuntu-latest
runner-python-version:
- 3.7
ansible-version:
- git+https://github.com/ansible/ansible.git@devel
container-image:
- fedora31
#- ubuntu1804
- centos8
#- opensuse15
#- fedora30
- centos7
#- opensuse15py2
#- ubuntu1604
#- centos6
steps:
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-containers
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@v1
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 unit tests
run: |
[[ ! -d 'tests/unit' ]] && echo This collection does not have unit tests. Skipping... || \
~/.local/bin/ansible-test units --color --coverage --requirements --docker "${{ matrix.container-image }}" -vvv
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/containers/podman
# When we have unit tests, add them here

View file

@ -5,6 +5,8 @@ plugins/modules/podman_image.py validate-modules:parameter-type-not-in-doc
plugins/modules/podman_image.py validate-modules:undocumented-parameter
plugins/modules/podman_image_info.py validate-modules:parameter-list-no-elements
plugins/modules/podman_image_info.py validate-modules:parameter-type-not-in-doc
plugins/modules/podman_container.py validate-modules!skip
plugins/modules/podman_container.py validate-modules:invalid-ansiblemodule-schema
plugins/modules/podman_container.py validate-modules:missing-gplv3-license
plugins/modules/podman_container.py validate-modules:parameter-list-no-elements
plugins/modules/podman_container.py import-3.7!skip
plugins/modules/podman_container.py import-2.7!skip