Skip to content

Improve Terraform inventory options #47

Improve Terraform inventory options

Improve Terraform inventory options #47

Workflow file for this run

name: CI
on:
pull_request_target:
jobs:
integration:
runs-on: ubuntu-latest
name: Integration (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}+tf${{ matrix.terraform }})
env:
source: "./source"
aws_dir: "./amazon_aws"
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.13
- stable-2.14
python:
- '3.8'
- '3.9'
- '3.10'
terraform:
- "1.3.4"
exclude:
# ansi2.14 requires py>=3.9
- ansible: stable-2.14
python: '3.8'
steps:
- name: Checkout collection
uses: actions/checkout@v3
with:
path: ${{ env.source }}
- name: Build and install collection
id: install-collection
uses: ansible-network/github_actions/.github/actions/build_install_collection@main
with:
install_python_dependencies: true
source_path: ${{ env.source }}
- name: checkout ansible-collections/amazon.aws
uses: ansible-network/github_actions/.github/actions/checkout_dependency@main
with:
repository: ansible-collections/amazon.aws
path: ${{ env.amazon_aws }}
ref: main
- name: install amazon.aws collection
uses: ansible-network/github_actions/.github/actions/build_install_collection@main
with:
install_python_dependencies: true
source_path: ${{ env.amazon_aws }}
- name: Download terraform binary
run: >-
curl
-o terraform.zip
https://releases.hashicorp.com/terraform/${{ matrix.terraform }}/terraform_${{ matrix.terraform }}_linux_amd64.zip
shell: bash
- name: Install terraform binary
run: |-
zcat terraform.zip > terraform
chmod +x terraform
sudo mv terraform /usr/bin
terraform -v
shell: bash
- name: Create AWS/sts session credentials
uses: ansible-network/github_actions/.github/actions/ansible_aws_test_provider@main
with:
collection_path: ${{ steps.install-collection.outputs.collection_path }}
ansible_core_ci_key: ${{ secrets.ANSIBLE_CORE_CI_KEY }}
# we use raw git to create a repository in the tests
# this fails if the committer doesn't have a name and an email set
- name: Set up git
run: |
git config --global user.email gha@localhost
git config --global user.name "Github Actions"
shell: bash
- name: Run integration tests
uses: ansible-network/github_actions/.github/actions/ansible_test_integration@main
with:
collection_path: ${{ steps.install-collection.outputs.collection_path }}
python_version: ${{ matrix.python }}
ansible_version: ${{ matrix.ansible }}