test: fixes for Github CI issues
This commit is contained in:
@@ -60,6 +60,13 @@ jobs:
|
|||||||
python3 -m pip install --upgrade pip
|
python3 -m pip install --upgrade pip
|
||||||
python3 -m pip install playwright>=1.55.0 patchright>=1.55.0 camoufox
|
python3 -m pip install playwright>=1.55.0 patchright>=1.55.0 camoufox
|
||||||
|
|
||||||
|
- name: Get Playwright version
|
||||||
|
id: playwright-version
|
||||||
|
run: |
|
||||||
|
PLAYWRIGHT_VERSION=$(python3 -c "import playwright; print(playwright.__version__)")
|
||||||
|
echo "version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Playwright version: $PLAYWRIGHT_VERSION"
|
||||||
|
|
||||||
- name: Retrieve Playwright browsers from cache if any
|
- name: Retrieve Playwright browsers from cache if any
|
||||||
id: playwright-cache
|
id: playwright-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -68,16 +75,24 @@ jobs:
|
|||||||
~/.cache/ms-playwright
|
~/.cache/ms-playwright
|
||||||
~/Library/Caches/ms-playwright
|
~/Library/Caches/ms-playwright
|
||||||
~/.ms-playwright
|
~/.ms-playwright
|
||||||
key: ${{ runner.os }}-playwright-${{ hashFiles('pyproject.toml') }}
|
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}-v1
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}-
|
||||||
${{ runner.os }}-playwright-
|
${{ runner.os }}-playwright-
|
||||||
|
|
||||||
- name: Install Playwright browsers
|
- name: Install Playwright browsers
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
|
echo "Cache hit: ${{ steps.playwright-cache.outputs.cache-hit }}"
|
||||||
python3 -m playwright install chromium
|
python3 -m playwright install chromium
|
||||||
python3 -m playwright install-deps chromium firefox
|
python3 -m playwright install-deps chromium firefox
|
||||||
|
|
||||||
|
- name: Get Camoufox version
|
||||||
|
id: camoufox-version
|
||||||
|
run: |
|
||||||
|
CAMOUFOX_VERSION=$(python3 -c "import camoufox; print(camoufox.__version__)")
|
||||||
|
echo "version=$CAMOUFOX_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Camoufox version: $CAMOUFOX_VERSION"
|
||||||
|
|
||||||
- name: Retrieve Camoufox browser from cache if any
|
- name: Retrieve Camoufox browser from cache if any
|
||||||
id: camoufox-cache
|
id: camoufox-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@@ -85,13 +100,14 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/.cache/camoufox
|
~/.cache/camoufox
|
||||||
~/Library/Caches/camoufox
|
~/Library/Caches/camoufox
|
||||||
key: ${{ runner.os }}-camoufox-${{ hashFiles('pyproject.toml') }}
|
key: ${{ runner.os }}-camoufox-${{ steps.camoufox-version.outputs.version }}-v1
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
|
${{ runner.os }}-camoufox-${{ steps.camoufox-version.outputs.version }}-
|
||||||
${{ runner.os }}-camoufox-
|
${{ runner.os }}-camoufox-
|
||||||
|
|
||||||
- name: Install Camoufox browser
|
- name: Install Camoufox browser
|
||||||
if: steps.camoufox-cache.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
|
echo "Cache hit: ${{ steps.camoufox-cache.outputs.cache-hit }}"
|
||||||
python3 -m camoufox fetch --browserforge
|
python3 -m camoufox fetch --browserforge
|
||||||
|
|
||||||
# Cache tox environments
|
# Cache tox environments
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[pytest]
|
[pytest]
|
||||||
asyncio_mode = auto
|
asyncio_mode = strict
|
||||||
asyncio_default_fixture_loop_scope = function
|
asyncio_default_fixture_loop_scope = function
|
||||||
addopts = -p no:warnings --doctest-modules --ignore=setup.py --verbose
|
addopts = -p no:warnings --doctest-modules --ignore=setup.py --verbose
|
||||||
markers =
|
markers =
|
||||||
|
|||||||
Reference in New Issue
Block a user