google.cloud/.github/workflows/integration.yml
Alex Stephen 614d1e7602
Github Action for Integration Test Running
Runs integration tests through Github Actions
2020-01-06 12:45:12 -08:00

41 lines
1.3 KiB
YAML

name: Ansible Integration Test Runner
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install ansible
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and install collection
run: |
ansible-galaxy collection build .
ansible-collection install *.gz
- name: Add service account file
env:
SERVICE_ACCOUNT_FILE: ${{ secrets.SERVICE_ACCOUNT_FILE }}
run: |
echo $SERVICE_ACCOUNT_FILE > /tmp/service_account.json
- name: Add test template
env:
TEST_SETTINGS_TEMPLATE: ${{ secrets.TEST_SETTINGS_TEMPLATE }}
run: |
pushd ~/.ansible/collections/ansible_collections/google/cloud
echo $TEST_SETTINGS_TEMPLATE > tests/integration/cloud-config-gcp.ini
- name: Run the tests
run: |
pushd ~/.ansible/collections/ansible_collections/google/cloud
ansible-test integration -v --allow-unsupported --continue-on-error $(find tests/integration/targets -name "gcp*" -type d -printf "%P ")