-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (71 loc) · 2.53 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
name: integration tests
on:
# for testing
workflow_dispatch:
schedule:
# - cron: '1 17 * * THU'
- cron: '1 20 * * *'
pull_request:
branches:
- master
env:
TEST_TEST_RUNNER_SCRIPT: ".test-runner/run.integration.sh"
TEST_TEST_RUNNER_LOGS_NAME: ansible-solace-test-integration-logs
TEST_RUNNER_LOGS_DIR: integration-logs
jobs:
integration_test:
runs-on: ubuntu-18.04
strategy:
# max-parallel: 1
matrix:
python-version: [ '3.8' ]
ansible-version: [ 'ansible>=2.10.3,<2.11' ]
steps:
- name: Check Auth
if: github.event_name == 'workflow_dispatch' && github.actor != 'ricardojosegomezulmke'
run: |
echo "not authorized"
echo '::set-output name=IS_AUTHORIZED::false'
id: auth
- name: Cancel Workflow
if: ${{ always() && steps.auth.outputs.IS_AUTHORIZED == 'false' }}
uses: andymckay/[email protected]
- name: Checkout Current Branch
uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: Install open ldap
run: |
sudo apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install ansible and collection
env:
ANSIBLE_VERSION: "${{ matrix.ansible-version }}"
run: |
python -m pip install --upgrade pip
pip install "$ANSIBLE_VERSION"
pip install requests
pip install xmltodict
pip install docker-compose
pip install python-ldap
ansible-galaxy collection install solace.pubsub_plus
- name: Run Tests
run: |
export ANSIBLE_PYTHON_INTERPRETER=$(python -c "import sys; print(sys.executable)")
export PROJECT_HOME="$GITHUB_WORKSPACE"
export SOLACE_CLOUD_API_TOKEN="${{ secrets.SOLACE_CLOUD_API_TOKEN_ALL_PERMISSIONS }}"
export WORKING_WITH_LDAP_JUMPCLOUD_ORG_ID="${{ secrets.JUMPCLOUD_ORG_ID }}"
export LOG_DIR="$GITHUB_WORKSPACE/${TEST_RUNNER_LOGS_DIR}"
./${TEST_TEST_RUNNER_SCRIPT}
- name: Archive logs
if: ${{ (failure() && !cancelled()) || (always() && github.event_name == 'workflow_dispatch') }}
uses: actions/upload-artifact@v2
with:
name: ${{ env.TEST_TEST_RUNNER_LOGS_NAME }}
path: ${{ github.workspace }}/${{ env.TEST_RUNNER_LOGS_DIR }}
if-no-files-found: error
###
# The End.