fix: upgrade ansible version, address test and lint errors

This commit is contained in:
Chris Hawk 2023-11-17 16:39:42 -08:00
commit 08ada5354d
216 changed files with 4394 additions and 4262 deletions

View file

@ -1,11 +1,12 @@
name: "Run integration tests for the cloud.google collection"
---
name: Run integration tests for the cloud.google collection
on:
pull_request: {}
push:
branches: master
env:
GCP_SERVICE_ACCOUNT: "github-ci@ansible-gcp-ci.iam.gserviceaccount.com"
GCP_PROJECT: "ansible-gcp-ci"
GCP_SERVICE_ACCOUNT: github-ci@ansible-gcp-ci.iam.gserviceaccount.com
GCP_PROJECT: ansible-gcp-ci
GCP_FOLDER_ID: "542027184392"
jobs:
integration:
@ -31,7 +32,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.9' # this is the minimum version required for Ansible 2.13
python-version: "3.9" # this is the minimum version required for Ansible 2.13
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install ansible-base (${{ matrix.ansible_version }})
@ -55,15 +56,15 @@ jobs:
env:
CI_SERVICE_ACCOUNT_FILE_CONTENTS: ${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}
with:
service_account: "$GCP_SERVICE_ACCOUNT"
credentials_json: "${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}"
service_account: $GCP_SERVICE_ACCOUNT
credentials_json: ${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Run cleanup
run: |
run: |
./scripts/bootstrap-project.sh $GCP_PROJECT $GCP_SERVICE_ACCOUNT
./scripts/cleanup-project.sh $GCP_PROJECT $GCP_FOLDER_ID
# run tests
- name: Run integration tests
# Add the -vvv flag to print out more output
run: ansible-test integration -v --color --python 3.9 --venv-system-site-packages
run: ansible-test integration -v --color --python 3.9 --venv-system-site-packages

View file

@ -1,4 +1,5 @@
name: "Run tests for the cloud.google collection"
---
name: Run tests for the cloud.google collection
on: [pull_request]
env:
PYTHON_VERSION: "3.9" # minimum version for Ansible 2.14
@ -58,7 +59,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "${{ env.PYTHON_VERSION }}"
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install test dependencies
@ -66,4 +67,4 @@ jobs:
- name: Install ansible-base (${{ matrix.ansible_version }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
- name: Run unit tests
run: ansible-test units -v --color --python "$PYTHON_VERSION"
run: ansible-test units -v --color --python "$PYTHON_VERSION"

View file

@ -1,25 +1,25 @@
---
name: Upload release to Automation Hub
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_AUTOMATION_HUB_API_KEY: ${{ secrets.ANSIBLE_AUTOMATION_HUB_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key=$ANSIBLE_AUTOMATION_HUB_API_KEY -s=https://cloud.redhat.com/api/automation-hub/
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_AUTOMATION_HUB_API_KEY: ${{ secrets.ANSIBLE_AUTOMATION_HUB_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key=$ANSIBLE_AUTOMATION_HUB_API_KEY -s=https://cloud.redhat.com/api/automation-hub/

View file

@ -1,15 +1,16 @@
name: "google.cloud.gcloud"
---
name: google.cloud.gcloud
on:
push:
paths:
- 'roles/gcloud/**'
- '.github/workflows/gcloud.yml'
- 'molecule/gcloud/**'
- roles/gcloud/**
- .github/workflows/gcloud.yml
- molecule/gcloud/**
pull_request:
paths:
- 'roles/gcloud/**'
- '.github/workflows/gcloud.yml'
- 'molecule/gcloud/**'
- roles/gcloud/**
- .github/workflows/gcloud.yml
- molecule/gcloud/**
jobs:
molecule:
runs-on: ubuntu-18.04

View file

@ -1,4 +1,5 @@
name: "google.cloud.gcsfuse"
---
name: google.cloud.gcsfuse
on:
push:
paths:

View file

@ -1,25 +1,25 @@
---
name: Upload release to Galaxy
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_GALAXY_API_KEY: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key $ANSIBLE_GALAXY_API_KEY