name: CrackMapExec Tests

on:
  workflow_dispatch:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: CrackMapExec Tests for Py${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        os: [ubuntu-latest]
        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
    steps:
    - uses: actions/checkout@v3
    - name: CrackMapExec tests on ${{ matrix.os }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install poetry
      run: |
        pipx install poetry --python python${{ matrix.python-version }}
        poetry --version
        poetry env info
    - name: Install librairies with dev group
      run: |
        poetry install --with dev
    - name: Run the e2e test
      run: |
        poetry run pytest tests
