mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-11 05:10:27 -07:00
Ansible role tests were failing due to ansible-lint reporting multiple errors. Fixing those errors resolves the failing tests. Switching gcsfuse to use gcloud's bootstrap to follow the current docker install instructions. Removing centos as it's a discontinued distribution. Adding a check to ensure integration tests are skipped unless they are run by a branch (a public fork does not pass required integration test credentials).
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: "google.cloud.gcsfuse"
|
|
on:
|
|
push:
|
|
paths:
|
|
- roles/gcsfuse/**
|
|
- .github/workflows/gcsfuse.yml
|
|
pull_request:
|
|
paths:
|
|
- roles/gcsfuse/**
|
|
- .github/workflows/gcsfuse.yml
|
|
jobs:
|
|
gcsfuse:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
PY_COLORS: 1
|
|
ANSIBLE_FORCE_COLOR: 1
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
collection_role:
|
|
- gcsfuse
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v1
|
|
with:
|
|
path: ansible_collections/google/cloud
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg \
|
|
lsb-release
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg \
|
|
--dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
echo \
|
|
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
|
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
|
sudo apt-get update
|
|
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
|
python -m pip install --upgrade pip
|
|
pip install molecule[docker] yamllint ansible ansible-lint docker
|
|
|
|
- name: Run role test
|
|
run: >-
|
|
molecule --version &&
|
|
ansible --version &&
|
|
MOLECULE_NO_LOG="false"
|
|
molecule --debug test -s ${{ matrix.collection_role }}
|