generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 17
75 lines (66 loc) · 2.71 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
name: Integration
on:
pull_request_target:
jobs:
test:
runs-on: ubuntu-latest
env:
source: "./source"
aws_dir: "./amazon_aws"
crypto_dir: "./community.crypto"
ansible_version: "stable-2.14"
python_version: "3.9"
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: false
source_path: ${{ env.source }}
# checkout and install 'amazon.aws'
- 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 }}
# checkout and install 'community.crypto'
- name: checkout ansible-collections/community.crypto
uses: ansible-network/github_actions/.github/actions/checkout_dependency@main
with:
repository: ansible-collections/community.crypto
path: ${{ env.crypto_dir }}
ref: main
- name: install community.crypto collection
uses: ansible-network/github_actions/.github/actions/build_install_collection@main
with:
install_python_dependencies: false
source_path: ${{ env.crypto_dir }}
- 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: ${{ env.python_version }}
ansible_version: ${{ env.ansible_version }}
ansible_test_requirement_files: 'test-requirements.txt'