-
Notifications
You must be signed in to change notification settings - Fork 34
97 lines (96 loc) · 2.51 KB
/
tests.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
name: "Tests"
on: # yamllint disable
workflow_call:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-24.04"
type: string
full-integration:
description: "Run full integration tests"
required: false
default: false
type: boolean
jobs:
lint:
runs-on: "${{ inputs.runs-on }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Linting"
run: "invoke lint"
unit:
runs-on: "${{ inputs.runs-on }}"
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Tests"
run: "invoke unit"
needs:
- "lint"
integration_partial:
# Only run a subset of integration tests on normal PRs
if: ${{ inputs.full-integration == false }}
uses: ./.github/workflows/integration_tests.yml
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
nautobot-version:
- "2.4"
ansible-version:
- "2.17"
- "2.18"
with:
python-version: "${{ matrix.python-version }}"
nautobot-version: "${{ matrix.nautobot-version }}"
ansible-version: "${{ matrix.ansible-version }}"
needs:
- "unit"
integration_full:
if: ${{ inputs.full-integration == true }}
uses: ./.github/workflows/integration_tests.yml
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.12"
nautobot-version:
- "2.0"
- "2.1"
- "2.2"
- "2.3"
- "2.4"
ansible-version:
- "2.16"
- "2.17"
- "2.18"
exclude:
- python-version: "3.12"
nautobot-version: "2.0"
- python-version: "3.12"
nautobot-version: "2.1"
- python-version: "3.12"
nautobot-version: "2.2"
with:
python-version: "${{ matrix.python-version }}"
nautobot-version: "${{ matrix.nautobot-version }}"
ansible-version: "${{ matrix.ansible-version }}"
needs:
- "unit"