-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
69 lines (63 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cargo fmt
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-latest
# Hermetic httpbin for HTTP-semantics integration tests. Plain HTTP loopback avoids
# public-egress flakiness that previously broke http_fetch / redirects / non_html suites.
services:
httpbin:
# Classic Python httpbin: full endpoint set including /brotli and authenticated{true}
# shape used by HTTP-semantics tests. Plain HTTP loopback keeps the suite hermetic.
image: kennethreitz/httpbin:latest
ports:
- 8080:80
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Wait for hermetic httpbin
run: |
for i in $(seq 1 60); do
if curl -fsS -o /dev/null -w "%{http_code}" "http://127.0.0.1:8080/get" | grep -q '^200$'; then
echo "httpbin ready"
exit 0
fi
sleep 1
done
echo "hermetic httpbin did not become ready" >&2
exit 1
- name: Cargo test
run: cargo test --workspace --all-features
env:
RUST_TEST_THREADS: "1"
BASECRAWL_HTTPBIN_BASE: http://127.0.0.1:8080