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
35 changes: 21 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -47,10 +47,12 @@ jobs:
run: cargo +nightly fmt --all -- --check

- name: Clippy
run: cargo +stable clippy --all-targets --all-features -- -D warnings
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo +stable clippy --all-targets --all-features --workspace --exclude feedparser-rs-py -- -D warnings

- name: Check documentation
run: cargo doc --no-deps --all-features
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo doc --no-deps --all-features --workspace --exclude feedparser-rs-py
env:
RUSTDOCFLAGS: "-D warnings"

Expand All @@ -65,7 +67,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -80,13 +82,16 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Build
run: cargo build --all-features
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo build --all-features --workspace --exclude feedparser-rs-py

- name: Run tests
run: cargo nextest run --all-features --no-fail-fast
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo nextest run --all-features --no-fail-fast --workspace --exclude feedparser-rs-py

- name: Run doctests
run: cargo test --doc --all-features
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo test --doc --all-features --workspace --exclude feedparser-rs-py

# Node.js bindings tests
test-node:
Expand All @@ -100,7 +105,7 @@ jobs:
node: [20, 22]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -113,7 +118,7 @@ jobs:
workspaces: crates/feedparser-rs-node

- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'
Expand All @@ -137,7 +142,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -151,10 +156,11 @@ jobs:
uses: taiki-e/install-action@cargo-tarpaulin

- name: Generate coverage
run: cargo tarpaulin --out xml --all-features --engine llvm
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo tarpaulin --out xml --all-features --engine llvm --workspace --exclude feedparser-rs-py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ./cobertura.xml
fail_ci_if_error: false
Expand All @@ -166,7 +172,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust 1.88.0
uses: dtolnay/rust-toolchain@master
Expand All @@ -179,7 +185,8 @@ jobs:
shared-key: "msrv"

- name: Check with MSRV
run: cargo +1.88.0 check --all-features
# Exclude feedparser-rs-py (cdylib requires Python runtime for linking)
run: cargo +1.88.0 check --all-features --workspace --exclude feedparser-rs-py

# All checks passed gate
ci-success:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand All @@ -29,7 +29,7 @@ jobs:
run: sleep 30

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
body_path: CHANGELOG.md
12 changes: 6 additions & 6 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
target: x86_64-pc-windows-msvc

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
Expand All @@ -54,7 +54,7 @@ jobs:
run: npm run build -- --target ${{ matrix.target }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: bindings-${{ matrix.target }}
path: crates/feedparser-rs-node/*.node
Expand All @@ -65,16 +65,16 @@ jobs:
needs: build

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
path: crates/feedparser-rs-node/artifacts

Expand Down
113 changes: 113 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["crates/feedparser-rs-core", "crates/feedparser-rs-node"]
members = ["crates/feedparser-rs-core", "crates/feedparser-rs-node", "crates/feedparser-rs-py"]
resolver = "2"

[workspace.package]
Expand Down
20 changes: 20 additions & 0 deletions crates/feedparser-rs-py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "feedparser-rs-py"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
license = "MIT OR Apache-2.0"
description = "High-performance RSS/Atom/JSON Feed parser for Python (drop-in feedparser replacement)"
repository = "https://github.com/rabax/feedparser-rs"
keywords = ["rss", "atom", "feed", "parser", "python"]
categories = ["parsing", "web-programming"]
publish = false # Published via maturin to PyPI

[lib]
name = "feedparser_rs"
crate-type = ["cdylib"]

[dependencies]
feedparser-rs-core = { path = "../feedparser-rs-core" }
pyo3 = { workspace = true, features = ["extension-module", "chrono"] }
chrono = { workspace = true, features = ["clock"] }
Loading