diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:04:41 +0000 |
commit | 975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch) | |
tree | 89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/vultr/cloud/.github | |
parent | Initial commit. (diff) | |
download | ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.tar.xz ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.zip |
Adding upstream version 7.7.0+dfsg.upstream/7.7.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/vultr/cloud/.github')
5 files changed, 251 insertions, 0 deletions
diff --git a/ansible_collections/vultr/cloud/.github/dependabot.yml b/ansible_collections/vultr/cloud/.github/dependabot.yml new file mode 100644 index 000000000..607e7e1a2 --- /dev/null +++ b/ansible_collections/vultr/cloud/.github/dependabot.yml @@ -0,0 +1,8 @@ +# Set update schedule for GitHub Actions +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/ansible_collections/vultr/cloud/.github/workflows/integration.yml b/ansible_collections/vultr/cloud/.github/workflows/integration.yml new file mode 100644 index 000000000..689891737 --- /dev/null +++ b/ansible_collections/vultr/cloud/.github/workflows/integration.yml @@ -0,0 +1,91 @@ +--- +name: Collection integration + +on: + pull_request: + types: [labeled] + push: + branches: + - main + paths: + - ".github/workflows/integration.yml" + - "plugins/**" + - "tests/integration/**" + schedule: + - cron: 56 3 * * 2 # Run weekly + +jobs: + integration-test: + name: Integration test Ansible ${{ matrix.ansible }} Py${{ matrix.python }} + if: ${{ github.event.label.name == 'automation' || github.ref_name == 'main' }} + runs-on: ubuntu-20.04 + defaults: + run: + working-directory: ansible_collections/vultr/cloud + strategy: + max-parallel: 1 + fail-fast: false + matrix: + ansible: + - stable-2.14 + python: + - "3.10" + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + path: ansible_collections/vultr/cloud + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install ansible-base (${{ matrix.ansible }}) + run: | + python -m pip install --upgrade pip + pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Build and install collection + run: | + ansible-galaxy collection build . + ansible-galaxy collection install *.gz + + - name: Add config file + env: + VULTR_CONFIG_FILE: ${{ secrets.VULTR_CONFIG_FILE }} + run: | + echo "$VULTR_CONFIG_FILE" > tests/integration/cloud-config-vultr.ini + + - name: Ensure no other integration test is currently running + uses: softprops/turnstyle@v1 + timeout-minutes: 60 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + same-branch-only: false + + - name: Run the tests + run: >- + ansible-test + integration + --docker + -v + --color + --continue-on-error + --diff + --python ${{ matrix.python }} + --coverage + cloud/vultr/ + + - name: Generate coverage report + run: >- + ansible-test + coverage xml + -v + --requirements + --group-by command + --group-by version + - uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: false diff --git a/ansible_collections/vultr/cloud/.github/workflows/publish.yml b/ansible_collections/vultr/cloud/.github/workflows/publish.yml new file mode 100644 index 000000000..8e13d6925 --- /dev/null +++ b/ansible_collections/vultr/cloud/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +--- +name: Upload release to Galaxy + +on: + release: + types: [created] + +jobs: + call-workflow-sanity: + uses: ./.github/workflows/sanity.yml + + deploy: + runs-on: ubuntu-latest + needs: call-workflow-sanity + defaults: + run: + working-directory: ansible_collections/vultr/cloud + steps: + - uses: actions/checkout@v3 + with: + path: ansible_collections/vultr/cloud + + - name: Set up Python + uses: actions/setup-python@v4 + 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 diff --git a/ansible_collections/vultr/cloud/.github/workflows/sanity.yml b/ansible_collections/vultr/cloud/.github/workflows/sanity.yml new file mode 100644 index 000000000..386568562 --- /dev/null +++ b/ansible_collections/vultr/cloud/.github/workflows/sanity.yml @@ -0,0 +1,43 @@ +--- +name: Sanity + +on: + push: + branches: + - main + schedule: + - cron: "5 12 * * *" + pull_request: + workflow_call: + workflow_dispatch: + +jobs: + sanity: + name: Sanity (${{ matrix.ansible }}) + runs-on: ubuntu-20.04 + defaults: + run: + working-directory: ansible_collections/vultr/cloud + strategy: + matrix: + ansible: + - stable-2.12 + - stable-2.13 + - stable-2.14 + - devel + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + path: ansible_collections/vultr/cloud + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install ansible-base (${{ matrix.ansible }}) + run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Run sanity tests + run: ansible-test sanity --docker -v --color diff --git a/ansible_collections/vultr/cloud/.github/workflows/unit.yml b/ansible_collections/vultr/cloud/.github/workflows/unit.yml new file mode 100644 index 000000000..667b58c30 --- /dev/null +++ b/ansible_collections/vultr/cloud/.github/workflows/unit.yml @@ -0,0 +1,71 @@ +--- +name: Unit tests + +on: + pull_request: + push: + branches: + - main + paths: + - '.github/workflows/unit.yml' + - 'plugins/**' + - 'tests/unit/**' + workflow_call: + workflow_dispatch: + +jobs: + unit-test: + name: Unit test Ansible ${{ matrix.ansible }} Py${{ matrix.python }} + runs-on: ubuntu-20.04 + defaults: + run: + working-directory: ansible_collections/vultr/cloud + strategy: + fail-fast: false + matrix: + ansible: + - stable-2.14 + python: + - "3.10" + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + path: ansible_collections/vultr/cloud + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install ansible-base (${{ matrix.ansible }}) + run: | + python -m pip install --upgrade pip + pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Build and install collection + run: | + ansible-galaxy collection build . + ansible-galaxy collection install *.gz + + - name: Run the tests + run: >- + ansible-test + units + --docker + -v + --color + --python ${{ matrix.python }} + --coverage + + - name: Generate coverage report + run: >- + ansible-test + coverage xml + -v + --requirements + --group-by command + --group-by version + - uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: false |