Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
try to cache chrome apt package
Nick Sweeting4599f815f2d2
diff --git a/.github/workflows/eval.yaml b/.github/workflows/eval.yamlindex e26266ed0..aabcfd5f1 100644--- a/.github/workflows/eval.yaml+++ b/.github/workflows/eval.yaml@@ -80,23 +80,31 @@ jobs:id: playwright_versionrun: echo "VERSION=$(uv pip list --format json | jq -r '.[] | select(.name == "playwright") | .version')" >> $GITHUB_OUTPUT- - name: Cache Playwright browsers- uses: actions/cache@v4+ - name: Cache chrome binaries+ uses: actions/cache@v3with:- path: ~/.cache/ms-playwright- key: ${{ runner.os }}-playwright-${{ steps.playwright_version.outputs.VERSION }}- restore-keys: |- ${{ runner.os }}-playwright-+ path: |+ /tmp+ key: ${{ runner.os }}-chrome-stable- - name: Install Playwright browser dependencies+ - name: Install Chrome stable binaryrun: |- echo "Installing Playwright browsers..."- # comment out some based on whether stealth=True is used for evals or not- playwright install --no-shell chromium --with-deps- patchright install --no-shell chromium --with-deps- playwright install --no-shell chrome --with-deps- patchright install --no-shell chrome --with-deps- echo "Playwright browsers installed successfully"+ sudo apt-get update -qq \+ && curl -o "/tmp/google-chrome-stable.deb" -z "/tmp/google-chrome-stable.deb" "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \+ && apt-get install -y "/tmp/google-chrome-stable.deb" -f+ - run: patchright install chrome --with-deps+ - run: playwright install chrome --with-deps+ # could use $(uname -m) instead of hardcoding amd64++ - name: Cache chromium binaries+ uses: actions/cache@v3+ with:+ path: |+ ~/.cache/ms-playwright+ key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-chromium++ - run: playwright install chromium --with-deps+ - run: patchright install chromium --with-deps- name: Install Xvfb for headed modeif: github.event.client_payload.script_args.headless == 'false'diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yamlindex 35c9ae76a..f8e0faf77 100644--- a/.github/workflows/test.yaml+++ b/.github/workflows/test.yaml@@ -79,7 +79,22 @@ jobs:- name: Detect installed Playwright versionrun: echo "PLAYWRIGHT_VERSION=$(uv pip list --format json | jq -r '.[] | select(.name == "playwright") | .version')" >> $GITHUB_ENV- - name: Cache playwright binaries+ - name: Cache chrome binaries+ uses: actions/cache@v3+ with:+ path: |+ /tmp+ key: ${{ runner.os }}-chrome-stable++ - name: Install Chrome stable binary+ run: |+ sudo apt-get update -qq \+ && curl -o "/tmp/google-chrome-stable.deb" -z "/tmp/google-chrome-stable.deb" "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \+ && apt-get install -y "/tmp/google-chrome-stable.deb" -f+ - run: patchright install chrome --with-deps+ - run: playwright install chrome --with-deps++ - name: Cache chromium binariesuses: actions/cache@v3with:path: |@@ -87,8 +102,6 @@ jobs:key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-chromium- run: playwright install chromium --with-deps- - run: playwright install chrome --with-deps- - run: patchright install chrome --with-deps- run: patchright install chromium --with-deps- run: pytest tests/ci/${{ matrix.test_filename }}.py@@ -116,7 +129,22 @@ jobs:- name: Detect installed Playwright versionrun: echo "PLAYWRIGHT_VERSION=$(uv pip list --format json | jq -r '.[] | select(.name == "playwright") | .version')" >> $GITHUB_ENV- - name: Cache playwright binaries+ - name: Cache chrome binaries+ uses: actions/cache@v3+ with:+ path: |+ /tmp+ key: ${{ runner.os }}-chrome-stable++ - name: Install Chrome stable binary+ run: |+ sudo apt-get update -qq \+ && curl -o "/tmp/google-chrome-stable.deb" -z "/tmp/google-chrome-stable.deb" "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \+ && apt-get install -y "/tmp/google-chrome-stable.deb" -f+ - run: patchright install chrome --with-deps+ - run: playwright install chrome --with-deps++ - name: Cache chromium binariesuses: actions/cache@v3with:path: |@@ -124,8 +152,6 @@ jobs:key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-chromium- run: playwright install chromium --with-deps- - run: playwright install chrome --with-deps- - run: patchright install chrome --with-deps- run: patchright install chromium --with-deps- name: Run agent tasks evaluation and capture score