This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |