name: Python integration tests

on:
  workflow_dispatch:
    inputs:
      zoneId:
        description: 'Identifier of a zone with one Controller and one LG available (static or dynamic)'
        required: true
        default: 'kcNc7'

jobs:
  test:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Set up Python 3.x
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install .
        python -m pip install jq
    - name: Test with integration script
      run: |
        ./tests/integration/runAllScripts.sh ${{ secrets.NLWEB_API_URL }} ${{ secrets.NLWEB_TOKEN }} ${{ github.event.inputs.zoneId }}
