Skip to content

build(docker): fix LazyLock compile #81

build(docker): fix LazyLock compile

build(docker): fix LazyLock compile #81

Workflow file for this run

name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Dependencies
run: |
sudo apt-get install -y --no-install-recommends curl unzip gpg ca-certificates git openssh-client && sudo apt-get update
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup update stable
- name: Build
run: cargo build --verbose --release
- name: Download and Set Up Headless-Shell
run: |
sudo mkdir -p /out/latest/headless-shell
sudo curl -SL https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.126/linux64/chrome-headless-shell-linux64.zip -o chrome-headless-shell-linux64.zip
sudo unzip chrome-headless-shell-linux64.zip -d /out/latest/headless-shell
sudo chmod +x /out/latest/headless-shell/chrome-headless-shell-linux64/chrome-headless-shell
sudo chmod -R 777 /out
npx playwright install-deps chromium
- name: Run Tests
run: |
cargo test --package headless_browser --test cdp -- --nocapture
env:
HEADLESS: true
CHROME_PATH: /out/latest/headless-shell/chrome-headless-shell-linux64/chrome-headless-shell
RUST_LOG: info,error,warn
TEST_NO_ARGS: false