Skip to content

Commit

Permalink
Merge pull request #123 from ansible-collections/integration-tests
Browse files Browse the repository at this point in the history
Github Action for Integration Test Running
  • Loading branch information
rambleraptor authored Jan 6, 2020
2 parents 6f82977 + 614d1e7 commit e0258e1
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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 ")

0 comments on commit e0258e1

Please sign in to comment.