Skip to content

Commit

Permalink
Re-implement servers in axum (#94)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ostenbom authored Jun 3, 2024
1 parent 8af080e commit c0d3f05
Show file tree
Hide file tree
Showing 25 changed files with 2,284 additions and 1,419 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,35 @@ jobs:
- run: rustup component add clippy
- run: cargo clippy

test:
name: Test Suite
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
- run: rustup component add rustfmt
- run: cargo fmt --all --check

fmt:
name: Rustfmt
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- run: cargo fmt --all --check

- name: Start Wrangler Worker
working-directory: worker
run: |
cp wrangler.toml.sample wrangler.toml
npm install -g wrangler@latest
nohup npx wrangler@latest dev > wrangler.log 2>&1 &
tail -f wrangler.log | while read LOGLINE
do
echo "${LOGLINE}"
[[ "${LOGLINE}" == *"Ready on http://localhost:8787"* ]] && pkill -P $$ tail
done
- run: cd $GITHUB_WORKSPACE && cargo test --all-features

worker-build:
name: Worker build
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@

# We don't want to save KV IDs in our source code
**/wrangler.toml

# Side effects of running the wrangler cli
**/.wrangler
**/node_modules
Loading

0 comments on commit c0d3f05

Please sign in to comment.