forked from SatelliteQE/broker
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (100 loc) · 3.28 KB
/
Copy pathcode-checks.yml
File metadata and controls
115 lines (100 loc) · 3.28 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "Run Tests"
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "*.md"
- "*.example"
- ".gitignore"
- "tests/functional/*"
jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
services:
hussh-test-server:
image: ghcr.io/jacobcallahan/hussh/hussh-test-server:latest
options: >-
--name hussh-test-server
ports:
- 8022:22
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
# Full clone history is required for accurate change detection
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Get changed common SSH files
id: changed_common_ssh_files
uses: tj-actions/changed-files@v47
with:
files: |
broker/session.py
broker/hosts.py
broker/settings.py
tests/test_ssh.py
tests/data/ssh/**
.github/workflows/code-checks.yml
- name: Get changed Hussh files
id: changed_hussh_files
uses: tj-actions/changed-files@v47
with:
files: broker/binds/hussh.py
- name: Get changed Paramiko files
id: changed_paramiko_files
uses: tj-actions/changed-files@v47
with:
files: broker/binds/paramiko.py
- name: Get changed ssh2 files
id: changed_ssh2_files
uses: tj-actions/changed-files@v47
with:
files: broker/binds/ssh2.py
- name: Setup Temp Directory
run: mkdir broker_dir
- name: Core Unit Tests (excluding SSH)
env:
UV_SYSTEM_PYTHON: 1
run: |
uv pip install "broker[ansibletower,dev,podman,openstack] @ ."
broker config init --from tests/data/broker_settings.yaml
broker config view
pytest -v tests/ --ignore tests/functional --ignore tests/test_ssh.py
- name: Test Hussh backend
if: steps.changed_common_ssh_files.outputs.any_changed == 'true' || steps.changed_hussh_files.outputs.any_changed == 'true'
env:
UV_SYSTEM_PYTHON: 1
BROKER_SSH__BACKEND: hussh
run: |
uv pip install "broker[hussh] @ ."
pytest -v tests/test_ssh.py
- name: Test Paramiko backend
if: steps.changed_common_ssh_files.outputs.any_changed == 'true' || steps.changed_paramiko_files.outputs.any_changed == 'true'
env:
UV_SYSTEM_PYTHON: 1
BROKER_SSH__BACKEND: paramiko
run: |
uv pip install "broker[paramiko] @ ."
pytest -v tests/test_ssh.py
- name: Test ssh2-python backend
if: steps.changed_common_ssh_files.outputs.any_changed == 'true' || steps.changed_ssh2_files.outputs.any_changed == 'true'
env:
UV_SYSTEM_PYTHON: 1
BROKER_SSH__BACKEND: ssh2-python
run: |
uv pip install "broker[ssh2-python] @ ."
pytest -v tests/test_ssh.py