Skip to content

Commit ae398e6

Browse files
committed
CI: test ansible 2.9, 2.10, 2.12
1 parent 0b97902 commit ae398e6

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

.github/workflows/pull_request.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,38 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
ansible:
18-
- stable-2.9
19-
- stable-2.10
20-
- devel
18+
- "2.9"
19+
- "2.10"
20+
- "2.12"
2121
steps:
2222
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
2323
- uses: actions/checkout@v2
2424

2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
pip install git+https://github.com/ansible/ansible.git@${{ matrix.ansible }}
29-
pip install 'ansible-lint<5'
28+
if [[ "${{ matrix.ansible }}" = "2.9" ]]; then
29+
ansible_package=ansible
30+
elif [[ "${{ matrix.ansible }}" = "2.10" ]]; then
31+
ansible_package=ansible-base
32+
else
33+
ansible_package=ansible-core
34+
fi
35+
pip install $ansible_package==${{ matrix.ansible }}.* 'ansible-lint<5'
3036
3137
- name: Linting code
3238
run: |
3339
ansible-lint -v --force-color
3440
3541
integration:
3642
runs-on: ubuntu-latest
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
ansible:
47+
- "2.9"
48+
- "2.10"
49+
- "2.12"
3750
steps:
3851
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
3952
- uses: actions/checkout@v2
@@ -43,8 +56,16 @@ jobs:
4356
- name: Install dependencies
4457
run: |
4558
python3 -m pip install --upgrade pip
46-
python3 -m pip install ansible==5.* docker
47-
ansible-galaxy collection install git+file://$(pwd)
59+
if [[ "${{ matrix.ansible }}" = "2.9" ]]; then
60+
ansible_package=ansible
61+
elif [[ "${{ matrix.ansible }}" = "2.10" ]]; then
62+
ansible_package=ansible-base
63+
else
64+
ansible_package=ansible-core
65+
fi
66+
python3 -m pip install $ansible_package==${{ matrix.ansible }}.* docker
67+
ansible-galaxy collection build
68+
ansible-galaxy collection install *.tar.gz
4869
4970
# TODO: Use ansible-test to run these.
5071
- name: Running integration tests

0 commit comments

Comments
 (0)