Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,29 @@ jobs:
fail-fast: false
matrix:
ansible:
- stable-2.9
- stable-2.10
- devel
- "2.9"
- "2.10"
- "2.12"
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v2

- uses: actions/setup-python@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/ansible/ansible.git@${{ matrix.ansible }}
pip install 'ansible-lint<5'
if [[ "${{ matrix.ansible }}" = "2.9" ]]; then
ansible_package=ansible
elif [[ "${{ matrix.ansible }}" = "2.10" ]]; then
ansible_package=ansible-base
else
ansible_package=ansible-core
fi
pip install $ansible_package==${{ matrix.ansible }}.* 'ansible-lint==5.*'

- name: Install Ansible Galaxy dependencies
run: |
ansible-galaxy collection install pulp.squeezer

- name: Linting code
Expand All @@ -35,10 +46,18 @@ jobs:

integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pulp:
- "3.16"
- "3.18"
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
- uses: actions/checkout@v2

- uses: actions/setup-python@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -48,6 +67,8 @@ jobs:
- name: Run Pulp in one
run: |
tests/pulp-in-one.sh
env:
PULP_TAG: ${{ matrix.pulp }}

# TODO: Use ansible-test to run these.
- name: Running integration tests
Expand Down
4 changes: 3 additions & 1 deletion tests/pulp-in-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set -o pipefail

mkdir -p settings

PULP_TAG=${PULP_TAG:3.18}

cat << EOF > settings/settings.py
CONTENT_ORIGIN='http://$(hostname):8080'
ANSIBLE_API_HOSTNAME='http://$(hostname):8080'
Expand All @@ -21,7 +23,7 @@ docker run \
--name pulp \
--volume "$(pwd)/settings":/etc/pulp \
--publish 8080:80 \
pulp/pulp:latest
pulp/pulp:$PULP_TAG

# Wait for it to come up.
attempts=0
Expand Down