name: CI on: # Run CI against all pushes (direct commits, also merged PRs), Pull Requests push: branches: - main - stable-* pull_request: # Run CI once per day (at 06:00 UTC) schedule: - cron: '0 6 * * *' jobs: sanity: name: Sanity (Ⓐ${{ matrix.ansible }}) strategy: matrix: ansible: # It's important that Sanity is tested against all stable-X.Y branches # Testing against `devel` may fail as new tests are added. - stable-2.9 - stable-2.10 - stable-2.11 - stable-2.12 - devel runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 with: path: ansible_collections/community/sops - name: Set up Python uses: actions/setup-python@v2 with: # it is just required to run that once as "ansible-test sanity" in the docker image # will run on all python versions it supports. python-version: 3.8 - name: Install ansible-core (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check # run ansible-test sanity inside of Docker. # The docker container has all the pinned dependencies that are required. - name: Run sanity tests run: ansible-test sanity --docker -v --color --coverage working-directory: ./ansible_collections/community/sops - name: Generate coverage report. run: ansible-test coverage xml -v --requirements --group-by command --group-by version working-directory: ./ansible_collections/community/sops - uses: codecov/codecov-action@v2 with: fail_ci_if_error: false integration: runs-on: ubuntu-latest strategy: matrix: ansible: - stable-2.11 - stable-2.12 - devel docker_container: - ubuntu1804 - ubuntu2004 sops_version: - 3.5.0 - 3.6.0 - 3.7.1 exclude: - ansible: devel docker_container: ubuntu1604 - ansible: stable-2.11 docker_container: ubuntu1604 include: # 2.9 - ansible: stable-2.9 docker_container: ubuntu1604 sops_version: 3.5.0 - ansible: stable-2.9 docker_container: ubuntu1604 sops_version: 3.6.0 - ansible: stable-2.9 docker_container: ubuntu1804 sops_version: 3.7.1 # 2.10 - ansible: stable-2.10 docker_container: ubuntu1804 sops_version: 3.7.1 steps: - name: Check out code uses: actions/checkout@v2 with: path: ansible_collections/community/sops - name: Adjust vars files so that sops ${{ matrix.sops_version }} is used run: | echo 'sops_version: ${{ matrix.sops_version }}' > tests/integration/targets/setup_sops/vars/main.yml working-directory: ./ansible_collections/community/sops - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install ansible-core (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check - name: Run integration tests in ${{ matrix.docker_container }} Docker container run: ansible-test integration --docker ${{ matrix.docker_container }} -v --color --retry-on-error --continue-on-error --diff --coverage working-directory: ./ansible_collections/community/sops - name: Generate coverage report. run: ansible-test coverage xml -v --requirements --group-by command --group-by version working-directory: ./ansible_collections/community/sops - uses: codecov/codecov-action@v2 with: fail_ci_if_error: false