Skip to content

Commit c0d3f05

Browse files
authored
Re-implement servers in axum (mentimeter#94)
Major rewrite of both linkup servers to axum. - Worker now uses axum for routing + native worker fetch for network requests - Local server now uses axum for routing + "native" hyper (no reqwest) for network requests - Adds server-tests to integration test both worker and local servers
1 parent 8af080e commit c0d3f05

25 files changed

+2284
-1419
lines changed

Diff for: .github/workflows/ci.yml

+20-7
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,35 @@ jobs:
1616
- run: rustup component add clippy
1717
- run: cargo clippy
1818

19-
test:
20-
name: Test Suite
19+
fmt:
20+
name: Rustfmt
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: dtolnay/rust-toolchain@stable
25-
- run: cargo test --all-features
25+
- run: rustup component add rustfmt
26+
- run: cargo fmt --all --check
2627

27-
fmt:
28-
name: Rustfmt
28+
test:
29+
name: Test Suite
2930
runs-on: ubuntu-latest
3031
steps:
3132
- uses: actions/checkout@v4
3233
- uses: dtolnay/rust-toolchain@stable
33-
- run: rustup component add rustfmt
34-
- run: cargo fmt --all --check
34+
35+
- name: Start Wrangler Worker
36+
working-directory: worker
37+
run: |
38+
cp wrangler.toml.sample wrangler.toml
39+
npm install -g wrangler@latest
40+
nohup npx wrangler@latest dev > wrangler.log 2>&1 &
41+
tail -f wrangler.log | while read LOGLINE
42+
do
43+
echo "${LOGLINE}"
44+
[[ "${LOGLINE}" == *"Ready on http://localhost:8787"* ]] && pkill -P $$ tail
45+
done
46+
47+
- run: cd $GITHUB_WORKSPACE && cargo test --all-features
3548

3649
worker-build:
3750
name: Worker build

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010

1111
# We don't want to save KV IDs in our source code
1212
**/wrangler.toml
13+
14+
# Side effects of running the wrangler cli
15+
**/.wrangler
16+
**/node_modules

0 commit comments

Comments
 (0)