name: CI Tests on: push: branches: - "main" pull_request: schedule: - cron: '0 6 * * *' env: NAMESPACE: grafana COLLECTION_NAME: grafana 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 integration: runs-on: ubuntu-latest name: Integration (Ⓐ${{ matrix.ansible }}-py${{ matrix.python }}) strategy: fail-fast: true max-parallel: 1 matrix: ansible: - stable-2.13 python: - '3.10' steps: - name: Check out code uses: actions/checkout@v2 with: path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} - name: create integration_config working-directory: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/tests/integration run: | cat < integration_config.yml stack_name: ${{ secrets.ANSIBLE_TEST_STACK_NAME }} org_name: ${{ secrets.ANSIBLE_TEST_ORG_NAME }} grafana_cloud_api_key: ${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }} grafana_api_key: ${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }} EOF - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} - 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 integration test run: ansible-test integration -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker --coverage working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}