mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-08 22:30:13 -07:00
fixing compute_url_map, add cleanup script
Compute_url_map was broken by #509: It also merged in #393, which has an erroneous understanding that compute_url_map always returns a diff (integration tests show it does not). Adding a cleanup script to help with environment hygiene. Added cleanup to CI to help make tests less flakey.
This commit is contained in:
parent
0cece672cf
commit
4816e97719
3 changed files with 53 additions and 5 deletions
24
.github/workflows/ansible-integration-tests.yml
vendored
24
.github/workflows/ansible-integration-tests.yml
vendored
|
@ -6,6 +6,9 @@ on:
|
|||
pull_request: {}
|
||||
push:
|
||||
branches: master
|
||||
env:
|
||||
GCP_SERVICE_ACCOUNT: "github-ci@ansible-gcp-ci.iam.gserviceaccount.com"
|
||||
GCP_PROJECT: "ansible-gcp-ci"
|
||||
jobs:
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -30,20 +33,31 @@ jobs:
|
|||
run: pip install -r requirements.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
|
||||
# bootstrap integration env
|
||||
- name: Write integration-test configuration files
|
||||
env:
|
||||
CI_SERVICE_ACCOUNT_FILE_CONTENTS: ${{ secrets.CI_SERVICE_ACCOUNT_FILE_CONTENTS }}
|
||||
run: |
|
||||
echo "$CI_SERVICE_ACCOUNT_FILE_CONTENTS" > /tmp/service-account-key.json
|
||||
echo "[default]
|
||||
gcp_project: ansible-gcp-ci
|
||||
gcp_project: $GCP_PROJECT
|
||||
gcp_cred_file: /tmp/service-account-key.json
|
||||
gcp_cred_kind: serviceaccount
|
||||
gcp_cred_email: github-ci@ansible-gcp-ci.iam.gserviceaccount.com
|
||||
gcp_cred_email: $GCP_SERVICE_ACCOUNT
|
||||
" > ./tests/integration/cloud-config-gcp.ini
|
||||
- name: test secrets
|
||||
env: ${{ secrets }}
|
||||
run: echo "$CI_SERVICE_ACCOUNT_FILE_CONTENTS"
|
||||
# cleanup test environment
|
||||
- name: Auth to Gcloud
|
||||
uses: google-github-actions/auth@v1
|
||||
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 }}"
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@v1
|
||||
- name: Run cleanup
|
||||
run: ./scripts/cleanup-project.sh $GCP_PROJECT $GCP_SERVICE_ACCOUNT
|
||||
# run tests
|
||||
- name: Run integration tests
|
||||
# Add the -vvv flag to print out more output
|
||||
run: ansible-test integration -v --color --python 3.8 --venv-system-site-packages
|
Loading…
Add table
Add a link
Reference in a new issue