Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 101 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,128 @@
on: [push, pull_request]
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Continuous integration
on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
name: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
command: check
key: rust/check

- name: Run cargo check
run: cargo check --workspace

test:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
command: test
key: rust/test

fmt:
name: Rustfmt
- name: Run tests
run: cargo test --verbose --workspace

rust-fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
components: rustfmt

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
command: fmt
args: --all -- --check
key: rust/rustfmt

- name: Run Rust fmt
run: cargo fmt --all -- --check

clippy:
name: Clippy
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
components: clippy

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: rust/clippy

- name: Build
run: cargo build --workspace

- name: Clippy
run: cargo clippy --all-targets --all-features -- --deny warnings

doc:
name: doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
command: clippy
args: -- -D warnings
key: rust/doc

msrv:
- name: Run cargo doc to check for warnings
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features

toml-fmt:
name: taplo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install taplo
uses: taiki-e/install-action@cargo-binstall
with:
profile: minimal
toolchain: "1.70.0"
override: true
- uses: actions-rs/cargo@v1
tool: taplo-cli

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
command: check
args: --lib
key: rust/taplo

- name: Run TOML fmt
run: taplo fmt --check
127 changes: 88 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "chromiumoxide"
version = "0.7.0"
rust-version = "1.70"
rust-version = "1.87"
authors = ["Matthias Seitz <matthias.seitz@outlook.de>"]
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -13,47 +13,48 @@ keywords = ["chrome", "chromedriver", "puppeteer", "automation"]
categories = ["web-programming", "api-bindings", "development-tools::testing"]

[dependencies]
async-tungstenite = "0.28.0"
serde = { version = "1", features = ["derive"] }
async-std = { version = "1", features = [
"attributes",
"unstable",
async-tungstenite = "0.29.1"
serde = { version = "1.0.197", features = ["derive"] }
async-std = { version = "1.12.0", features = [
"attributes",
"unstable",
], optional = true }
futures = "0.3"
futures = "0.3.31"
chromiumoxide_types = { path = "chromiumoxide_types", version = "0.7" }
chromiumoxide_cdp = { path = "chromiumoxide_cdp", version = "0.7" }
chromiumoxide_fetcher = { path = "chromiumoxide_fetcher", version = "0.7", default-features = false, optional = true }
serde_json = "1"
which = "6"
thiserror = "1"
url = "2"
base64 = "0.22"
fnv = "1"
futures-timer = "3"
cfg-if = "1"
tokio = { version = "1", features = [
"rt",
"rt-multi-thread",
"time",
"fs",
"macros",
"process",
serde_json = "1.0.114"
which = "8.0.0"
thiserror = "2.0.12"
url = "2.5.4"
base64 = "0.22.1"
fnv = "1.0.7"
futures-timer = "3.0.3"
cfg-if = "1.0.1"
tokio = { version = "1.37.0", features = [
"rt",
"rt-multi-thread",
"time",
"fs",
"macros",
"process",
], optional = true }
tracing = "0.1"
pin-project-lite = "0.2"
dunce = "1"
bytes = { version = "1", features = ["serde"], optional = true }
reqwest = { version = "0.12", default-features = false }
tracing = "0.1.40"
pin-project-lite = "0.2.13"
dunce = "1.0.5"
bytes = { version = "1.5.0", features = ["serde"], optional = true }
reqwest = { version = "0.12.20", default-features = false }

[target.'cfg(windows)'.dependencies]
winreg = "0.52"
winreg = "0.55.0"

[dev-dependencies]
quote = "1"
proc-macro2 = "1"
chrono = "0.4.1"
tracing-subscriber = "0.3"
tokio = { version = "1", features = ["rt-multi-thread", "time", "macros"] }
quote = "1.0.40"
proc-macro2 = "1.0.95"
chrono = "0.4.38"
tracing-subscriber = "0.3.18"
tokio = { version = "1.37.0", features = ["rt-multi-thread", "time", "macros"] }
ureq = "3.0.12"

[features]
default = ["async-std-runtime", "bytes"]
Expand All @@ -65,9 +66,15 @@ serde0 = []

# Temporary features until cargo weak dependencies bug is fixed
# See https://github.com/rust-lang/cargo/issues/10801
_fetcher-rustls-async-std = ["fetcher", "chromiumoxide_fetcher/_rustls-async-std"]
_fetcher-rustls-async-std = [
"fetcher",
"chromiumoxide_fetcher/_rustls-async-std",
]
_fetcher-rusttls-tokio = ["fetcher", "chromiumoxide_fetcher/_rustls-tokio"]
_fetcher-native-async-std = ["fetcher", "chromiumoxide_fetcher/_native-async-std"]
_fetcher-native-async-std = [
"fetcher",
"chromiumoxide_fetcher/_native-async-std",
]
_fetcher-native-tokio = ["fetcher", "chromiumoxide_fetcher/_native-tokio"]

[[example]]
Expand Down Expand Up @@ -100,8 +107,50 @@ required-features = ["tokio-runtime", "_fetcher-native-tokio"]

[workspace]
members = [
"chromiumoxide_pdl",
"chromiumoxide_types",
"chromiumoxide_cdp",
"chromiumoxide_fetcher",
"chromiumoxide_pdl",
"chromiumoxide_types",
"chromiumoxide_cdp",
"chromiumoxide_fetcher",
]

[workspace.dependencies]
# Core dependencies
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
thiserror = "2.0.12"
anyhow = "1.0.86"
either = "1.15.0"

# Async runtime dependencies
async-std = { version = "1.12.0", features = ["attributes", "unstable"] }
tokio = { version = "1.37.0", features = [
"rt",
"rt-multi-thread",
"time",
"fs",
"macros",
"process",
] }
futures = "0.3.31"

# Web and networking
reqwest = { version = "0.12.20", default-features = false }
surf = { version = "2.3.2", default-features = false }
ureq = "3.0.12"

# File and system utilities
directories = "6.0.0"
os_info = { version = "3.12.0", default-features = false }
zip = { version = "4.2.0", default-features = false, features = ["deflate"] }
tempfile = "3.20.0"

# Parsing and code generation
regex = "1.11.1"
quote = "1.0.40"
proc-macro2 = "1.0.95"
heck = "0.5.0"
once_cell = "1.21.3"

# Development dependencies
chrono = "0.4.38"
tracing-subscriber = "0.3.18"
10 changes: 5 additions & 5 deletions chromiumoxide_cdp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "chromiumoxide_cdp"
version = "0.7.0"
authors = ["Matthias Seitz <matthias.seitz@outlook.de>"]
edition = "2021"
rust-version = "1.70"
rust-version = "1.87"
description = "Contains all the generated types for chromiumoxide"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/mattsse/chromiumoxide"
Expand All @@ -16,11 +16,11 @@ serde0 = []

[dev-dependencies]
chromiumoxide_pdl = { path = "../chromiumoxide_pdl", version = "0.7" }
ureq = "2.10.0"
tempfile = "3.10.1"
ureq = { workspace = true }
tempfile = { workspace = true }

[dependencies]
chromiumoxide_pdl = { path = "../chromiumoxide_pdl", version = "0.7" }
chromiumoxide_types = { path = "../chromiumoxide_types", version = "0.7" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
Loading
Loading