summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/grafana/.github/workflows
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
commit975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch)
tree89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/community/grafana/.github/workflows
parentInitial commit. (diff)
downloadansible-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/community/grafana/.github/workflows')
-rw-r--r--ansible_collections/community/grafana/.github/workflows/ansible-test.yml60
-rw-r--r--ansible_collections/community/grafana/.github/workflows/check_grafana_releases.yml37
-rw-r--r--ansible_collections/community/grafana/.github/workflows/fragment.yml18
-rw-r--r--ansible_collections/community/grafana/.github/workflows/rebase.yml24
4 files changed, 139 insertions, 0 deletions
diff --git a/ansible_collections/community/grafana/.github/workflows/ansible-test.yml b/ansible_collections/community/grafana/.github/workflows/ansible-test.yml
new file mode 100644
index 000000000..e8f2cd6b3
--- /dev/null
+++ b/ansible_collections/community/grafana/.github/workflows/ansible-test.yml
@@ -0,0 +1,60 @@
+name: CI
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+
+jobs:
+ sanity:
+ runs-on: ubuntu-latest
+ name: Sanity (Ⓐ$${{ matrix.ansible_version }})
+ timeout-minutes: 30
+ strategy:
+ matrix:
+ python_version: ["3.9"]
+ ansible_version: ["stable-2.13", "stable-2.14", "devel"]
+ steps:
+ - name: Perform testing
+ uses: ansible-community/ansible-test-gh-action@release/v1
+ with:
+ ansible-core-version: ${{ matrix.ansible_version }}
+ origin-python-version: ${{ matrix.python_version }}
+ target-python-version: ${{ matrix.python_version }}
+ testing-type: sanity
+
+ units:
+ runs-on: ubuntu-latest
+ name: Units (Ⓐ$${{ matrix.ansible_version }})
+ timeout-minutes: 30
+ strategy:
+ matrix:
+ python_version: ["3.9"]
+ ansible_version: ["stable-2.13", "stable-2.14", "devel"]
+ steps:
+ - name: Perform testing
+ uses: ansible-community/ansible-test-gh-action@release/v1
+ with:
+ ansible-core-version: ${{ matrix.ansible_version }}
+ origin-python-version: ${{ matrix.python_version }}
+ target-python-version: ${{ matrix.python_version }}
+ testing-type: units
+
+ integration:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ grafana_version: ["9.2.6", "8.5.15", "7.5.16"]
+ ansible_version: ["stable-2.13", "stable-2.14", "devel"]
+ python_version: ["3.9"]
+ services:
+ grafana:
+ image: grafana/grafana:${{ matrix.grafana_version }}
+ steps:
+ - name: Perform testing
+ uses: ansible-community/ansible-test-gh-action@release/v1
+ with:
+ ansible-core-version: ${{ matrix.ansible_version }}
+ target-python-version: ${{ matrix.python_version }}
+ testing-type: integration
diff --git a/ansible_collections/community/grafana/.github/workflows/check_grafana_releases.yml b/ansible_collections/community/grafana/.github/workflows/check_grafana_releases.yml
new file mode 100644
index 000000000..e3fd3b02f
--- /dev/null
+++ b/ansible_collections/community/grafana/.github/workflows/check_grafana_releases.yml
@@ -0,0 +1,37 @@
+name: Check Grafana Releases
+
+on:
+ schedule:
+ - cron: '0 1 * * 0'
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ check_grafana_releases:
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout@v2
+
+ - name: Set up Python ${{ matrix.python_version }}
+ uses: actions/setup-python@v2
+
+ - name: Install ansible
+ run: pip install -r hacking/requirements.txt
+
+ - name: Get the latest major releases of Grafana and update repo
+ run: |
+ RELEASES_LIST="$(python3 hacking/find_grafana_versions.py)"
+ sed -i "s/grafana_version:.*/grafana_version: $RELEASES_LIST/" .github/workflows/ansible-test.yml README.md
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v4
+ with:
+ token: ${{ secrets.RREY_PAT }}
+ commit-message: Update tested Grafana versions
+ title: Bump Grafana versions
+ branch: auto-bump-grafana
+ reviewers: rrey
+ base: main
diff --git a/ansible_collections/community/grafana/.github/workflows/fragment.yml b/ansible_collections/community/grafana/.github/workflows/fragment.yml
new file mode 100644
index 000000000..3e1ebe73c
--- /dev/null
+++ b/ansible_collections/community/grafana/.github/workflows/fragment.yml
@@ -0,0 +1,18 @@
+---
+on:
+ pull_request:
+
+name: Check changelog fragment
+jobs:
+ check_fragment:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Check that changelog fragment exists
+ run: ./hacking/check_fragment.sh
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PR_NUMBER: ${{ github.event.number }}
diff --git a/ansible_collections/community/grafana/.github/workflows/rebase.yml b/ansible_collections/community/grafana/.github/workflows/rebase.yml
new file mode 100644
index 000000000..2b3e81c51
--- /dev/null
+++ b/ansible_collections/community/grafana/.github/workflows/rebase.yml
@@ -0,0 +1,24 @@
+# https://github.com/marketplace/actions/automatic-rebase
+# GitHub Actions don't automatically rebase before running, so add support for people to type `/rebase`
+on:
+ issue_comment:
+ types: [created]
+name: Automatic Rebase
+jobs:
+ rebase:
+ name: Rebase
+ if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@1.6
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
+ always_job:
+ name: Aways run job
+ runs-on: ubuntu-latest
+ steps:
+ - name: Always run
+ run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."