Skip to content

Commit

Permalink
Merge pull request #15 from mbaldessari/v1-from-main
Browse files Browse the repository at this point in the history
Update from main
  • Loading branch information
mbaldessari authored Sep 20, 2024
2 parents e219725 + ba9573b commit 1004f15
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 21 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ansible-sanitytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Ansible collection sanity tests

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

on: [push, pull_request]

jobs:
ansible_unittests:
name: Ansible collection sanity tests
strategy:
matrix:
python-version: [3.11.3, 3.12.6]
ansible-core: ["2.16.*"]
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
path: ansible_collections/rhvp/cluster_utils

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest ansible-core=='${{ matrix.ansible-core }}'
- name: Run make ansible-sanitytest
run: |
cd ansible_collections/rhvp/cluster_utils
make ansible-sanitytest
24 changes: 3 additions & 21 deletions .github/workflows/ansible-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,18 @@ name: Ansible unit tests
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on: [push, pull_request]

###############
# Set the Job #
###############
jobs:
ansible_unittests:
# Name the Job
name: Ansible unit tests
strategy:
matrix:
python-version: [3.11.3]
# Set the agent to run on
python-version: [3.11.3, 3.12.6]
ansible-core: ["2.16.*"]
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v4
with:
Expand All @@ -44,12 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest ansible-core=='2.16.*'
- name: Run make ansible-sanitytest
run: |
cd ansible_collections/rhvp/cluster_utils
make ansible-sanitytest
pip install pytest ansible-core=='${{ matrix.ansible-core }}'
- name: Run make ansible-unittest
run: |
Expand Down

0 comments on commit 1004f15

Please sign in to comment.