forked from geissdoerfer/shepherd
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (44 loc) · 1.58 KB
/
qc_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
name: Test for Quality Control
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
workflow_call:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies 🔧
run: |
sudo apt update
sudo apt install python3-msgpack
sudo apt install cppcheck
python3 -m pip install --upgrade pip msgpack
pip3 install ansible -U
ansible-galaxy collection install ansible.posix
ansible-galaxy collection install community.general
# NOTE: install-process fails without msgpack pre-installed
# NOTE: cppcheck is needed for pre-commit
# NOTE: ansible + collections might be needed for linter
- name: Run Pre-Commit Tests 🧪
uses: pre-commit/[email protected]
- name: Install the shepherd py-package 🐑
run: "pip3 install .[test]"
working-directory: "./software/python-package"
- name: Test the shepherd py-package (limited test-range) 🐐
run: "pytest"
working-directory: "./software/python-package"
# needs sudo because it installs packages
- name: Install the shepherd-herd py-package 𓋿 𓀍
run: "pip3 install ./"
working-directory: "./software/shepherd-herd"