diff --git a/.github/workflows/test-only.yml b/.github/workflows/test-only.yml index 1c6ceefc..8ae6383b 100644 --- a/.github/workflows/test-only.yml +++ b/.github/workflows/test-only.yml @@ -34,4 +34,5 @@ jobs: uses: ./.github/workflows/test-stack-reusable-workflow.yml with: python-version: '3.12' + skip-pypuppeteer: true diff --git a/.github/workflows/test-stack-reusable-workflow.yml b/.github/workflows/test-stack-reusable-workflow.yml index 2337b158..b33e16ec 100644 --- a/.github/workflows/test-stack-reusable-workflow.yml +++ b/.github/workflows/test-stack-reusable-workflow.yml @@ -8,6 +8,11 @@ on: required: true type: string default: '3.10' + skip-pypuppeteer: + description: 'Skip PyPuppeteer (not supported in 3.11/3.12)' + required: false + type: boolean + default: false jobs: test-application: @@ -96,6 +101,7 @@ jobs: # STRAIGHT TO CDP - name: Pyppeteer and SocketPuppetBrowser - Specific tests in built container + if: ${{ inputs.skip-pypuppeteer == false }} run: | # Playwright via Sockpuppetbrowser fetch docker run --rm -e "FLASK_SERVER_NAME=cdio" -e "FAST_PUPPETEER_CHROME_FETCHER=True" -e "PLAYWRIGHT_DRIVER_URL=ws://sockpuppetbrowser:3000" --network changedet-network --hostname=cdio test-changedetectionio bash -c 'cd changedetectionio;pytest --live-server-host=0.0.0.0 --live-server-port=5004 tests/fetchers/test_content.py' @@ -104,11 +110,13 @@ jobs: docker run --rm -e "FLASK_SERVER_NAME=cdio" -e "FAST_PUPPETEER_CHROME_FETCHER=True" -e "PLAYWRIGHT_DRIVER_URL=ws://sockpuppetbrowser:3000" --network changedet-network --hostname=cdio test-changedetectionio bash -c 'cd changedetectionio;pytest --live-server-host=0.0.0.0 --live-server-port=5004 tests/fetchers/test_custom_js_before_content.py' - name: Pyppeteer and SocketPuppetBrowser - Headers and requests checks - run: | + if: ${{ inputs.skip-pypuppeteer == false }} + run: | # Settings headers playwright tests - Call back in from Sockpuppetbrowser, check headers docker run --name "changedet" --hostname changedet --rm -e "FAST_PUPPETEER_CHROME_FETCHER=True" -e "FLASK_SERVER_NAME=changedet" -e "PLAYWRIGHT_DRIVER_URL=ws://sockpuppetbrowser:3000?dumpio=true" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio; pytest --live-server-host=0.0.0.0 --live-server-port=5004 tests/test_request.py' - name: Pyppeteer and SocketPuppetBrowser - Restock detection + if: ${{ inputs.skip-pypuppeteer == false }} run: | # restock detection via playwright - added name=changedet here so that playwright and sockpuppetbrowser can connect to it docker run --rm --name "changedet" -e "FLASK_SERVER_NAME=changedet" -e "FAST_PUPPETEER_CHROME_FETCHER=True" -e "PLAYWRIGHT_DRIVER_URL=ws://sockpuppetbrowser:3000" --network changedet-network test-changedetectionio bash -c 'cd changedetectionio;pytest --live-server-port=5004 --live-server-host=0.0.0.0 tests/restock/test_restock.py'