diff options
Diffstat (limited to 'ansible_collections/community/grafana/.github/workflows')
-rw-r--r-- | ansible_collections/community/grafana/.github/workflows/ansible-test.yml | 48 | ||||
-rw-r--r-- | ansible_collections/community/grafana/.github/workflows/lint.yml | 36 |
2 files changed, 77 insertions, 7 deletions
diff --git a/ansible_collections/community/grafana/.github/workflows/ansible-test.yml b/ansible_collections/community/grafana/.github/workflows/ansible-test.yml index e8f2cd6b3..a5717781f 100644 --- a/ansible_collections/community/grafana/.github/workflows/ansible-test.yml +++ b/ansible_collections/community/grafana/.github/workflows/ansible-test.yml @@ -12,8 +12,8 @@ jobs: timeout-minutes: 30 strategy: matrix: - python_version: ["3.9"] - ansible_version: ["stable-2.13", "stable-2.14", "devel"] + python_version: ["3.10"] + ansible_version: ["stable-2.15", "stable-2.16", "devel"] steps: - name: Perform testing uses: ansible-community/ansible-test-gh-action@release/v1 @@ -29,8 +29,8 @@ jobs: timeout-minutes: 30 strategy: matrix: - python_version: ["3.9"] - ansible_version: ["stable-2.13", "stable-2.14", "devel"] + python_version: ["3.10"] + ansible_version: ["stable-2.15", "stable-2.16", "devel"] steps: - name: Perform testing uses: ansible-community/ansible-test-gh-action@release/v1 @@ -45,9 +45,9 @@ jobs: 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"] + grafana_version: ["9.5.14", "8.5.27", "10.2.2"] + ansible_version: ["stable-2.15", "stable-2.16", "devel"] + python_version: ["3.10"] services: grafana: image: grafana/grafana:${{ matrix.grafana_version }} @@ -58,3 +58,37 @@ jobs: ansible-core-version: ${{ matrix.ansible_version }} target-python-version: ${{ matrix.python_version }} testing-type: integration + + molecule: + runs-on: ubuntu-latest + env: + PY_COLORS: 1 + ANSIBLE_FORCE_COLOR: 1 + strategy: + fail-fast: false + matrix: + grafana_version: ["9.5.14", "8.5.27", "10.2.2"] + ansible_version: ["stable-2.15", "stable-2.16", "devel"] + python_version: ["3.10"] + services: + grafana: + image: grafana/grafana:${{ matrix.grafana_version }} + ports: ["3000:3000"] + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Install dependencies + run: | + python -m pip install --no-cache-dir --upgrade pip + pip install "git+https://github.com/ansible/ansible@${{ matrix.ansible_version }}" molecule molecule-docker + + - name: Test with molecule + run: | + molecule --version + molecule test diff --git a/ansible_collections/community/grafana/.github/workflows/lint.yml b/ansible_collections/community/grafana/.github/workflows/lint.yml new file mode 100644 index 000000000..26216d89b --- /dev/null +++ b/ansible_collections/community/grafana/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + +jobs: + python: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v41 + with: + files: "**/*.py" + + - if: ${{ steps.changed-files.outputs.all_changed_files != '' }} + uses: psf/black@stable + with: + src: ${{ steps.changed-files.outputs.all_changed_files }} + + - if: ${{ steps.changed-files.outputs.all_changed_files != '' }} + uses: chartboost/ruff-action@v1 + with: + src: ${{ steps.changed-files.outputs.all_changed_files }} + ansible: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run ansible-lint + uses: ansible/ansible-lint@main |