Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): set concurrency for E2E test workflows #219

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .github/workflows/integration-tests-pr.yml

This file was deleted.

50 changes: 36 additions & 14 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,66 @@ on:
- LICENSE
branches:
- main

# pull_request:
# types: [review_requested,opened,reopened,synchronize]
pull_request_target:
paths:
- plugins/**
- tests/**
- Makefile
- requirements.txt
- requirements-dev.txt
- .github/**
workflow_dispatch:

permissions:
pull-requests: read
contents: read

jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.event_name == 'pull_request_target' && format('e2e-authorize-pr-{0}', github.event.pull_request.number) || 'e2e-authorize' }}
cancel-in-progress: true
steps:
- run: true

run-tests:
needs: authorize
runs-on: ubuntu-latest
concurrency: 'e2e-test'
defaults:
run:
working-directory: .ansible/collections/ansible_collections/equinix/cloud
steps:
- name: checkout repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
path: .ansible/collections/ansible_collections/equinix/cloud
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

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

- name: install make
run: sudo apt-get install -y build-essential

- name: setup python 3
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: install dependencies
run: python -m pip install -r requirements-dev.txt -r requirements.txt

- name: update apt
run: sudo apt update

- name: install parallel
run: sudo apt install parallel
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: run tests
run: make testall
env:
Expand Down
Loading