Skip to content

Test integration tests with galaxy_ng #146

Test integration tests with galaxy_ng

Test integration tests with galaxy_ng #146

Workflow file for this run

---
name: Test integration tests with galaxy_ng
on:
# Run CI against all pushes (direct commits, also merged PRs), Pull Requests
push:
branches:
- main
- stable-*
pull_request:
# Run CI once per day (at 06:00 UTC)
# This ensures that even if there haven't been commits that we are still testing against latest version of ansible-test for each ansible-base version
schedule:
- cron: '0 6 * * *'
jobs:
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
galaxy_ng_version:
# - stable-4.8
# - stable-4.9
- master
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Build and install the collection
id: build
uses: redhat-cop/ansible_collections_tooling/actions/build_ansible_collection@main
with:
collection_namespace: ansible
collection_name: hub
collection_version: 1.0.0
collection_repo: https://github.com/ansible-collections/ansible_hub
- name: "Checkout galaxy_ng"
uses: actions/checkout@v2
with:
repository: ansible/galaxy_ng
path: galaxy_ng
ref: ${{ matrix.galaxy_ng_version }}
- name: (Linux) Install docker compose
run: |
curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64
install /tmp/docker-compose /usr/local/bin/
# Note: COMPOSE_INTERACTIVE_NO_CLI=1 is required for oci-env to work correctly when there's no interactive terminal
- name: Set environment variables
working-directory: galaxy_ng
run: |
echo "OCI_ENV_PATH=${GITHUB_WORKSPACE}/oci_env" >> $GITHUB_ENV
echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV
echo "OCI_VERBOSE=1" >> $GITHUB_ENV
echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV
echo "GH_TEARDOWN=0" >> $GITHUB_ENV
echo "AH_HOST=http://localhost:55001/" >> $GITHUB_ENV
echo "AH_USERNAME=admin" >> $GITHUB_ENV
echo "AH_PASSWORD=admin" >> $GITHUB_ENV
- name: Update apt
run: sudo apt -y update
- name: Install LDAP requirements
run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential
- name: setup oci-env
working-directory: galaxy_ng
run: |
git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH
pip install -e $OCI_ENV_PATH/client/
mkdir $OCI_ENV_PATH/db_backup/
- name: Move ci cfg to oci
run: mv .github/files/ci.py ./galaxy_ng/dev/oci_env_integration/actions/ci.py
- name: Stand up galaxy_ng
working-directory: galaxy_ng
run: python3 dev/oci_env_integration/actions/ci.py
- name: Create integration config
working-directory: /home/runner/collections/ansible_collections/ansible/hub/tests/integration/
run: |
echo "ah_host: 'http://localhost:55001/'" > integration_config.yml
echo "ah_username: admin" >> integration_config.yml
echo "ah_password: admin" >> integration_config.yml
echo "ah_verify_ssl: false" >> integration_config.yml
- name: Run integration test - ah_namespace
run: ansible-test integration ah_namespace
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_build
run: ansible-test integration ah_build
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_approval
run: ansible-test integration ah_approval
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_collection
run: ansible-test integration ah_collection
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_collection_upload
run: ansible-test integration ah_collection_upload
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - collection_remote
run: ansible-test integration collection_remote
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - collection_repository
run: ansible-test integration collection_repository
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - collection_repository_sync
run: ansible-test integration collection_repository_sync
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_ee_registry
run: ansible-test integration ah_ee_registry
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_ee_repository
run: ansible-test integration ah_ee_repository
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_ee_repository_sync
run: ansible-test integration ah_ee_repository_sync
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_token
run: ansible-test integration ah_token
working-directory: /home/runner/collections/ansible_collections/ansible/hub
- name: Run integration test - ah_user
run: ansible-test integration ah_user
working-directory: /home/runner/collections/ansible_collections/ansible/hub