Skip to content

Commit

Permalink
Upgrade minimum Ansible version to v2.14 and test against Ansible v2.…
Browse files Browse the repository at this point in the history
…14 and v2.15

chore: bump ansible versions
  • Loading branch information
SirGitsalot authored Nov 21, 2023
2 parents cd881b4 + 2ca4ecc commit fadb559
Show file tree
Hide file tree
Showing 342 changed files with 4,464 additions and 4,371 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/ansible-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -18,9 +19,11 @@ jobs:
run:
working-directory: ansible_collections/google/cloud
strategy:
max-parallel: 1
matrix:
ansible_version:
- stable-2.13
- stable-2.14
- stable-2.15
steps:
- name: check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -53,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
12 changes: 7 additions & 5 deletions .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
@@ -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.15
Expand All @@ -12,6 +13,7 @@ jobs:
matrix:
ansible_version:
- stable-2.14
- stable-2.15
steps:
- name: check out code
uses: actions/checkout@v4
Expand All @@ -36,7 +38,7 @@ jobs:
# validate-modules cannot be turned on until #498 is resolved.
run: ansible-test sanity -v --color --skip validate-modules
- name: Install ansible-lint
run: pip install ansible-lint==6.13.1
run: pip install ansible-lint==6.22.0
- name: Run ansible-lint
run: ansible-lint
unit:
Expand All @@ -48,7 +50,7 @@ jobs:
matrix:
ansible_version:
- stable-2.14
- stable-2.11
- stable-2.15
steps:
- name: check out code
uses: actions/checkout@v4
Expand All @@ -57,12 +59,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install test dependencies
run: pip install -r requirements-test.txt
- 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"
2 changes: 1 addition & 1 deletion .github/workflows/automationhub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Upload release to Automation Hub

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/gcloud.yml
Original file line number Diff line number Diff line change
@@ -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-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gcsfuse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "google.cloud.gcsfuse"
---
name: google.cloud.gcsfuse
on:
push:
paths:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Upload release to Galaxy

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git clone <url> $TARGET_DIR/ansible_collections/google/cloud
Then set up your Python virtual environment:

```shell
cd $TARGET_DIR/ansible_collections/google
cd $TARGET_DIR/ansible_collections/google/cloud
python3 -m venv venv
. ./venv/bin/activate
pip3 install -r requirements.txt
Expand Down
Loading

0 comments on commit fadb559

Please sign in to comment.