Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
squash this commit
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mk committed Jan 15, 2024
1 parent 8400a99 commit 5b53339
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/ansible-tests-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on:
on:
pull_request_target:
paths:
- config
Expand Down Expand Up @@ -28,13 +28,6 @@ jobs:
needs: authorize
runs-on: ubuntu-latest
steps:
- name: checkout Ansible collection
uses: actions/checkout@v4
with:
repository: equinix-labs/ansible-collection-equinix
path: .ansible/collections/ansible_collections/equinix/cloud
ref: main

- name: update packages
run: sudo apt-get update -y

Expand All @@ -46,27 +39,28 @@ jobs:
with:
python-version: '3.8'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt

- name: install collection
run: make install

- name: replace existing keys
run: rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa

- name: checkout Python SDK, this PR
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: checkout Ansible collection
uses: actions/checkout@v4
with:
repository: equinix-labs/ansible-collection-equinix
path: .ansible/collections/ansible_collections/equinix/cloud
ref: main

- name: install dependencies of ansible collection
run: pip3 install -r requirements-dev.txt -r requirements.txt
working-directory: .ansible/collections/ansible_collections/equinix/cloud

- name: install cloned Python SDK
run: python3 -m pip install equinix_metal
working-directory: metal-python

- name: run tests
- name: run tests in ansible collection directory
run: make testall
working-directory: .ansible/collections/ansible_collections/equinix/cloud
working-directory: .ansible/collections/ansible_collections/equinix/cloud
env:
METAL_API_TOKEN: ${{ secrets.METAL_API_TOKEN }}

0 comments on commit 5b53339

Please sign in to comment.