Skip to content

Commit f92b2bc

Browse files
authored
Merge pull request #45 from stackhpc/fix-ci
Fix CI
2 parents 4f968b4 + 7f0b2dc commit f92b2bc

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

.github/workflows/pull_request.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,29 @@ 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

25+
- uses: actions/setup-python@v2
26+
2527
- name: Install dependencies
2628
run: |
2729
python -m pip install --upgrade pip
28-
pip install git+https://github.com/ansible/ansible.git@${{ matrix.ansible }}
29-
pip install 'ansible-lint<5'
30+
if [[ "${{ matrix.ansible }}" = "2.9" ]]; then
31+
ansible_package=ansible
32+
elif [[ "${{ matrix.ansible }}" = "2.10" ]]; then
33+
ansible_package=ansible-base
34+
else
35+
ansible_package=ansible-core
36+
fi
37+
pip install $ansible_package==${{ matrix.ansible }}.* 'ansible-lint==5.*'
38+
39+
- name: Install Ansible Galaxy dependencies
40+
run: |
3041
ansible-galaxy collection install pulp.squeezer
3142
3243
- name: Linting code
@@ -35,10 +46,18 @@ jobs:
3546
3647
integration:
3748
runs-on: ubuntu-latest
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
pulp:
53+
- "3.16"
54+
- "3.18"
3855
steps:
3956
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
4057
- uses: actions/checkout@v2
4158

59+
- uses: actions/setup-python@v2
60+
4261
- name: Install dependencies
4362
run: |
4463
python -m pip install --upgrade pip
@@ -48,6 +67,8 @@ jobs:
4867
- name: Run Pulp in one
4968
run: |
5069
tests/pulp-in-one.sh
70+
env:
71+
PULP_TAG: ${{ matrix.pulp }}
5172

5273
# TODO: Use ansible-test to run these.
5374
- name: Running integration tests

tests/pulp-in-one.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set -o pipefail
88

99
mkdir -p settings
1010

11+
PULP_TAG=${PULP_TAG:3.18}
12+
1113
cat << EOF > settings/settings.py
1214
CONTENT_ORIGIN='http://$(hostname):8080'
1315
ANSIBLE_API_HOSTNAME='http://$(hostname):8080'
@@ -21,7 +23,7 @@ docker run \
2123
--name pulp \
2224
--volume "$(pwd)/settings":/etc/pulp \
2325
--publish 8080:80 \
24-
pulp/pulp:latest
26+
pulp/pulp:$PULP_TAG
2527

2628
# Wait for it to come up.
2729
attempts=0

0 commit comments

Comments
 (0)