generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for * ah_namespace * ah_namespace * ah_collection * ah_collection_upload * ah_approval * collection_* * ah_ee_registry Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
- Loading branch information
Showing
17 changed files
with
911 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import action_lib | ||
|
||
env = action_lib.OCIEnvIntegrationTest( | ||
envs=[ | ||
{ | ||
"env_file": "standalone.compose.env", | ||
"run_tests": False, | ||
"db_restore": None, | ||
} | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
authors: | ||
- Sean Sullivan @sean-m-sullivan | ||
- Tom Page @Tompage1994 | ||
- David Danielsson @djdanielsson | ||
dependencies: {} | ||
description: Ansible content that interacts with the Ansible Automation Hub API | ||
documentation: https://github.com/ansible-collections/ansible_hub/blob/main/README.md | ||
license: | ||
- GPL-3.0-only | ||
namespace: {{ collection_namespace }} | ||
name: {{ collection_name }} | ||
version: {{ collection_version }} | ||
readme: README.md | ||
repository: {{ collection_repo }} | ||
issues: {{ collection_repo }}/issues | ||
tags: | ||
- cloud | ||
- infrastructure | ||
- galaxy | ||
- ansible | ||
- galaxy | ||
- automation | ||
build_ignore: | ||
- tools | ||
- setup.cfg | ||
- galaxy.yml.j2 | ||
- template_galaxy.yml | ||
- '*.tar.gz' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
--- | ||
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 |
Oops, something went wrong.