-
Notifications
You must be signed in to change notification settings - Fork 74
66 lines (53 loc) · 1.98 KB
/
release-cross-repo-test.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
name: Release Ansible cross repository test
on:
pull_request:
branches:
- main
types: [opened] # Workflow will only be executed when PR is opened to main branch
workflow_dispatch: # Manual trigger
jobs:
ansible_integration_test:
runs-on: ubuntu-latest
steps:
- name: Checkout linode_api4 repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: update packages
run: sudo apt-get update -y
- name: install make
run: sudo apt-get install -y build-essential
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Checkout ansible repo
uses: actions/checkout@v4
with:
repository: linode/ansible_linode
path: .ansible/collections/ansible_collections/linode/cloud
fetch-depth: 0
submodules: 'recursive'
- name: install dependencies
run: |
cd .ansible/collections/ansible_collections/linode/cloud
pip install -r requirements.txt -r requirements-dev.txt --upgrade-strategy only-if-needed
- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==6.0.1
- name: install collection
run: |
cd .ansible/collections/ansible_collections/linode/cloud
make install
- name: Install linode_api4 # Need to install from source after all ansible dependencies have been installed
run: make install
- name: replace existing keys
run: |
cd .ansible/collections/ansible_collections/linode/cloud
rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa
- name: Run Ansible Tests
run: |
cd .ansible/collections/ansible_collections/linode/cloud
make testall
env:
LINODE_API_TOKEN: ${{ secrets.LINODE_TOKEN }}