-
Notifications
You must be signed in to change notification settings - Fork 285
72 lines (62 loc) · 2.28 KB
/
repo-sanity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
name: repo-sanity
on:
push:
pull_request:
jobs:
tox-linters:
name: Tox-Lint (py${{ matrix.python }})
strategy:
matrix:
python:
- '3.10'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install flake8 tox
- name: Run lint test for py3
run: tox -elinters-py3 -vv
working-directory: ./ansible_collections/community/zabbix
sanity:
name: Sanity (Ⓐ${{ matrix.ansible }}+py${{ matrix.python }})
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.
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-changelogs
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- '3.11'
runs-on: ubuntu-latest
steps:
# ansible-test requires the collection to be in a directory in the form
# .../ansible_collections/NAMESPACE/COLLECTION_NAME/
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix
- name: Set up Python ${{ matrix.ansible }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
# Install the head of the given branch (devel, stable-2.10)
- name: Install ansible-base (${{ 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.
# Explicity specify the version of Python we want to test
- name: Run sanity tests
run: ansible-test sanity --docker -v --color --exclude molecule/ --python ${{ matrix.python }}
working-directory: ./ansible_collections/community/zabbix