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
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,37 @@ jobs:
python examples/python_fetchkit.py
timeout-minutes: 2

live-tests:
name: Live Fetcher Tests
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Detect changed fetchers
id: detect
run: |
FILTERS=$(bash scripts/changed-fetcher-tests.sh "origin/${{ github.base_ref }}")
echo "filters=$FILTERS" >> "$GITHUB_OUTPUT"
if [ -z "$FILTERS" ]; then
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
- name: Run live tests
if: steps.detect.outputs.skip == 'false'
run: |
for filter in ${{ steps.detect.outputs.filters }}; do
echo "::group::Running $filter"
cargo test --features live-tests -p fetchkit "$filter" -- --nocapture
echo "::endgroup::"
done
timeout-minutes: 5
continue-on-error: true

# Gate job for branch protection.
check:
name: Check
Expand Down
1 change: 1 addition & 0 deletions crates/fetchkit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ readme = "../../README.md"
[features]
default = []
bot-auth = ["dep:ed25519-dalek", "dep:base64", "dep:sha2", "dep:rand"]
live-tests = []

[dependencies]
tokio = { workspace = true }
Expand Down
Loading
Loading