Skip to content

Commit bf7f173

Browse files
authored
new: Adding cross repo testing workflow for Release (#378)
* move test upload logic to git submodule, and use it in e2e workflow * update script folder name * Test release-cross-repo-test.yml * trial 2 * 3 * switch order of python build * 5 * fix syntax * update python version * 6 * 7 * 8 * Final clean up and fix make dep installs * remove test_scripts * change job name * Pr comments * Pr comments
1 parent dac3f5e commit bf7f173

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release Ansible cross repository test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types: [opened] # Workflow will only be executed when PR is opened to main branch
8+
workflow_dispatch: # Manual trigger
9+
10+
11+
jobs:
12+
ansible_integration_test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout linode_api4 repository
16+
uses: actions/checkout@v4
17+
18+
- name: update packages
19+
run: sudo apt-get update -y
20+
21+
- name: install make
22+
run: sudo apt-get install -y build-essential
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: '3.10'
28+
29+
- name: Install linode_api4
30+
run: make install
31+
32+
- name: checkout repo
33+
uses: actions/checkout@v3
34+
with:
35+
repository: linode/ansible_linode
36+
path: .ansible/collections/ansible_collections/linode/cloud
37+
38+
- name: install dependencies
39+
run: |
40+
cd .ansible/collections/ansible_collections/linode/cloud
41+
pip install -r requirements.txt -r requirements-dev.txt --upgrade-strategy only-if-needed
42+
43+
- name: install ansible dependencies
44+
run: ansible-galaxy collection install amazon.aws:==6.0.1
45+
46+
- name: install collection
47+
run: |
48+
cd .ansible/collections/ansible_collections/linode/cloud
49+
make install
50+
51+
- name: replace existing keys
52+
run: |
53+
cd .ansible/collections/ansible_collections/linode/cloud
54+
rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa
55+
56+
- name: run tests
57+
run: |
58+
cd .ansible/collections/ansible_collections/linode/cloud
59+
make testall
60+
env:
61+
LINODE_API_TOKEN: ${{ secrets.LINODE_TOKEN }}

0 commit comments

Comments
 (0)