From 24b76d4a00e15ec17872babce85571c802429199 Mon Sep 17 00:00:00 2001 From: Nemental <15136847+Nemental@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:37:03 +0100 Subject: [PATCH] ci: migrate molecule workflow --- .github/workflows/ansible-test.yml | 33 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 35 ------------------------------ 2 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index eb606aaa..ca571f9c 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -58,3 +58,36 @@ 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 }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.10 + + - name: Install dependencies + run: | + python -m pip install --no-cache-dir --upgrade pip + pip install molecule[ansible] molecule-docker + + - name: Test with molecule + run: | + molecule --version + molecule test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index e62601cd..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: "test" -on: # yamllint disable-line rule:truthy - workflow_dispatch: - push: - pull_request: -jobs: - build: - runs-on: ubuntu-latest - env: - PY_COLORS: 1 - ANSIBLE_FORCE_COLOR: 1 - services: - grafana: - image: grafana/grafana:latest - ports: - - 3000:3000 - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - - name: Set up Python 3.8 - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Install dependencies - run: | - python -m pip install --no-cache-dir --upgrade pip - pip install molecule[ansible] molecule-docker - - - name: Test with molecule - run: | - molecule --version - molecule test