Skip to content

Commit

Permalink
Have sanity for 2.14.0 and 2.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bhati-pradeep committed Apr 1, 2024
1 parent 7985f71 commit dc51ab1
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/unit_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- main
jobs:
sanity:
sanity_ansible_core_2.15.0:
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down Expand Up @@ -38,6 +38,35 @@ jobs:
run: |
cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
ansible-test sanity --docker default --python ${{ matrix.python-version }} -v
sanity_ansible_core_2.14.0:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Docker
uses: docker-practice/actions-setup-docker@master
- name: Install ansible
run: |
pip install -r requirements.txt
- name: Build and install the collection
run: |
NAMESPACE=$(cat galaxy.yml | shyaml get-value namespace)
COLLECTION_NAME=$(cat galaxy.yml | shyaml get-value name)
VERSION=$(cat galaxy.yml | shyaml get-value version)
echo "NAMESPACE=${NAMESPACE}" >> $GITHUB_ENV
echo "COLLECTION_NAME=${COLLECTION_NAME}" >> $GITHUB_ENV
ansible-galaxy collection build --force
ansible-galaxy collection install ${NAMESPACE}-${COLLECTION_NAME}-${VERSION}.tar.gz --force
- name: Run tests
run: |
cd /home/${USER}/.ansible/collections/ansible_collections/${{ env.NAMESPACE }}/${{ env.COLLECTION_NAME }}
ansible-test sanity --docker default --python ${{ matrix.python-version }} -v
unit_testing:
runs-on: ubuntu-20.04
strategy:
Expand Down

0 comments on commit dc51ab1

Please sign in to comment.