name: Regular Integration Tests

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '0 0 */7 * *'
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v5

    - name: Set up Python 3.12
      uses: actions/setup-python@v6
      with:
        python-version: 3.12

    - name: Install uv 0.6.6
      run: |
        python -m ensurepip
        python -m pip install --upgrade pip
        python -m pip install uv==0.6.6 

    - name: Install dependencies
      shell: bash
      run: uv sync

    - name: Test with pytest
      env:
        USERNAME: ${{ secrets.PICNIC_USERNAME }}
        PASSWORD: ${{ secrets.PICNIC_PASSWORD }}
        COUNTRY_CODE: ${{ secrets.PICNIC_COUNTRY_CODE }}
      run: |
        uv run pytest -v integration_tests
   
