Debian Codegraph @

ansible_collections/community/zabbix/.github/workflows/repo-sanity.yml

raw
1 ---
2 name: repo-sanity
3 on:
4 push:
5 pull_request:
6
7 jobs:
8 tox-linters:
9 name: Tox-Lint (py${{ matrix.python }})
10 strategy:
11 matrix:
12 python:
13 - '3.12'
14 runs-on: ubuntu-latest
15 steps:
16 - name: Check out code
17 uses: actions/checkout@v6
18 with:
19 path: ansible_collections/community/zabbix
20
21 - name: Set up Python ${{ matrix.python }}
22 uses: actions/setup-python@v6
23 with:
24 python-version: ${{ matrix.python }}
25
26 - name: Install dependencies
27 run: pip install flake8 tox
28
29 - name: Run lint test for py3
30 run: tox -elinters-py3 -vv
31 working-directory: ./ansible_collections/community/zabbix
32
33 sanity:
34 name: Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
35 strategy:
36 matrix:
37 ansible:
38 # It's important that Sanity is tested against all stable-X.Y branches
39 # Testing against `devel` may fail as new tests are added.
40
41 # https://docs.ansible.com/projects/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-changelogs
42 - stable-2.16
43 - stable-2.17
44 - stable-2.18
45 - stable-2.19
46 - devel
47 python:
48 - '3.12'
49 runs-on: ubuntu-latest
50 steps:
51 # ansible-test requires the collection to be in a directory in the form
52 # .../ansible_collections/NAMESPACE/COLLECTION_NAME/
53
54 - name: Check out code
55 uses: actions/checkout@v6
56 with:
57 path: ansible_collections/community/zabbix
58
59 - name: Set up Python ${{ matrix.ansible }}
60 uses: actions/setup-python@v6
61 with:
62 python-version: ${{ matrix.python }}
63
64 # Install the head of the given branch (devel, stable-2.10)
65 - name: Install ansible-base (${{ matrix.ansible }})
66 run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
67
68 # run ansible-test sanity inside of Docker.
69 # The docker container has all the pinned dependencies that are required.
70 # Explicity specify the version of Python we want to test
71 - name: Run sanity tests
72 run: ansible-test sanity --docker -v --color --exclude molecule/ --python ${{ matrix.python }}
73 working-directory: ./ansible_collections/community/zabbix