Skip to content

Ansible Integration Tests for Bakery Module #2

Ansible Integration Tests for Bakery Module

Ansible Integration Tests for Bakery Module #2

# https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
env:
NAMESPACE: checkmk
COLLECTION_NAME: general
MODULE_NAME: bakery
name: Ansible Integration Tests for Bakery Module
on:
workflow_dispatch:
pull_request:
branches:
- main
- devel
paths:
- 'plugins/modules/${{env.MODULE_NAME}}.py'

Check failure on line 16 in .github/workflows/ans-int-test-bakery.yaml

View workflow run for this annotation

GitHub Actions / Ansible Integration Tests for Bakery Module

Invalid workflow file

The workflow is not valid. .github/workflows/ans-int-test-bakery.yaml (Line: 16, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.MODULE_NAME
jobs:
###
# Integration tests (RECOMMENDED)
#
# https://docs.ansible.com/ansible/latest/dev_guide/testing_integration.html
integration:
runs-on: ubuntu-latest
name: Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.13
- stable-2.14
- stable-2.15
- devel
python:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
exclude:
# Exclude unsupported sets.
- ansible: stable-2.13
python: '3.11'
steps:
- name: Check out code
uses: actions/checkout@v3
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- 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: Provide secrets file
run: echo "${{ secrets.CHECKMK_DOWNLOAD_PW }}" > ./tests/integration/files/.dl-secret
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
env:
CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }}
- name: Run integration test
run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}