Skip to content

Rewrite pytest-mh documentation #316

Rewrite pytest-mh documentation

Rewrite pytest-mh documentation #316

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tox:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.x"]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh
- name: Prepare tox environment and install packages
run: |
tox --colored=yes --notest
- name: Run tests
run: |
tox --colored=yes --skip-pkg-install
example:
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Checkout repository
uses: actions/checkout@v4
- name: Install containers dependencies
shell: bash
run: |
set -ex
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build containers
working-directory: example/containers
run: |
pwd
ls -l
sudo docker-compose build
- name: Build containers
working-directory: example/containers
run: |
sudo docker-compose up --detach
- name: Install packages
run: |
sudo apt update
sudo apt install -y gcc python3-dev libldap2-dev libsasl2-dev sshpass
pip3 install virtualenv
python3 -m venv .venv
source .venv/bin/activate
pip3 install -e .
pip3 install -r ./requirements.txt
pip3 install -r ./example/requirements.txt
- name: Run example tests
run: |
source .venv/bin/activate
pytest --color=yes --mh-config=./example/mhc.yaml -vvv ./example