1name: CI 2on: 3# Run CI against all pushes (direct commits) and Pull Requests 4- push 5- pull_request 6 7jobs: 8 9### 10# Sanity tests (REQUIRED) 11# 12# https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html 13 14 sanity: 15 name: Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}) 16 strategy: 17 matrix: 18 ansible: 19 # It's important that Sanity is tested against all stable-X.Y branches 20 # Testing against `devel` may fail as new tests are added. 21 - stable-2.9 # Only if your collection supports Ansible 2.9 22 - stable-2.10 23 - devel 24 python: 25 - 2.7 26 - 3.7 27 - 3.8 28 exclude: 29 - python: 3.8 # blocked by ansible/ansible#70155 30 runs-on: ubuntu-latest 31 steps: 32 33 - name: Check out code 34 uses: actions/checkout@v1 35 with: 36 path: ansible_collections/servicenow/servicenow 37 38 - name: Set up Python ${{ matrix.ansible }} 39 uses: actions/setup-python@v2 40 with: 41 python-version: ${{ matrix.python }} 42 43 # Install the head of the given branch (devel, stable-2.10) 44 - name: Install ansible-base (${{ matrix.ansible }}) 45 run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check 46 47 # run ansible-test sanity inside of Docker. 48 # The docker container has all the pinned dependencies that are required. 49 # Explicity specify the version of Python we want to test 50 - name: Run sanity tests 51 run: ansible-test sanity --docker -v --color --python ${{ matrix.python }} 52