Skip to content

Commit

Permalink
Updating git workflow to include ansible 2.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer-John committed Jun 23, 2023
1 parent b37e4eb commit ca6b756
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exclude_paths:
- changelogs/
- .github/
- meta/
49 changes: 44 additions & 5 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ansible-version: [stable-2.12]
ansible-version: [stable-2.13]
steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down Expand Up @@ -50,11 +50,9 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.12, stable-2.13, stable-2.14]
ansible-version: [stable-2.13, stable-2.14, stable-2.15]
exclude:
# Python 3.11 is supported only from ansible-core 2.14 onwards
- python-version: "3.11"
ansible-version: stable-2.12
- python-version: "3.11"
ansible-version: stable-2.13

Expand Down Expand Up @@ -93,7 +91,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ansible-version: [stable-2.12, stable-2.13, stable-2.14]
ansible-version: [stable-2.13, stable-2.14, stable-2.15]

steps:
- name: Set up Python 3.9
Expand Down Expand Up @@ -121,3 +119,44 @@ jobs:
- name: Run sanity tests
run: ansible-test sanity --docker -v --color
working-directory: /home/runner/.ansible/collections/ansible_collections/dellemc/unity

lint:
name: Ansible lint
runs-on: ubuntu-latest
needs: [build]
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.13, stable-2.14, stable-2.15]

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- name: Checkout the source code
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for progressive mode to work

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install ansible (${{ matrix.ansible-version }}) version
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check

- name: Install ansible lint
run: pip install ansible-lint --disable-pip-version-check

- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
with:
name: collection
path: .cache/collection-tarballs

- name: Install collection build
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz

- name: Run Ansible lint
run: ansible-lint --show-relpath
working-directory: /home/runner/work/ansible-unity/ansible-unity

0 comments on commit ca6b756

Please sign in to comment.