generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 3
144 lines (118 loc) · 5.69 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
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