Merge pull request #351 from Icinga/feature/add-compatlogger #294
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: Python Unittest | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- main | |
- 'feature/**' | |
- 'fix/**' | |
- '!doc/**' | |
paths: | |
- 'plugins/**' | |
pull_request: | |
branches: | |
- 'feature/**' | |
- 'fix/**' | |
- '!doc/**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
# max-parallel: 4 | |
matrix: | |
python: ['3.11'] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install "pylint>=2.14,<2.15" | |
- name: Lint Python Code | |
run: | | |
python -m pylint plugins/ | |
unittest-py3: | |
runs-on: ubuntu-latest | |
strategy: | |
# max-parallel: 4 | |
matrix: | |
distro: [centos8, debian10] | |
python: [ '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install "ansible-core>=2.13.10" "requests>=1.0.0" | |
- name: Test with unittest | |
run: | | |
python -m unittest -v tests.unittestpy3.test_data | |
python -m unittest -v tests.unittestpy3.test_inventory | |
env: | |
MOLECULE_DISTRO: ${{ matrix.distro }}# |