Skip to content

Commit

Permalink
feat: Implement car-mirror-wasm and car-mirror-axum crates (#44)
Browse files Browse the repository at this point in the history
* feat: Succinctly encode `PullRequest` and `PushResponse`

* feat: Write `car-mirror-axum` crate

* refactor: Move car-mirror-reqwest integration test into doctest

* fix: PullRequest/PushResponse dagcbor roundtripping

* chore: Add necessary features

* feat: Write car-mirror-wasm crate & playwright tests

* feat: Serve both HTTP + HTTPS with self signed certs

* refactor: Disable crate for non-wasm in a different way

* feat: Auto-detect whether to use streaming or not

* chore: Run tests for both HTTP and HTTPS

* feat: Run playwright tests in github actions

* fix: Don't require confirmation on cargo binstall command

* fix: correct playwright action commands

* fix: Cache JS deps & setup wasm32 target in action

* chore: Try some stuf

* chore: Fix lints

* fix: Support webkit that doesn't have BYOBReader support

* chore: fmt

* fix: Reintroduce `car_mirror_axum::serve`

* chore: Run reqwest axum integration with coverage

* chore: Test more lines in `messages.rs`: `indicates_finished`

* chore: Write `car-mirror-axum` documentation

* fix: Pin version of wasm-bindgen in CI

* feat: Switch to `playwright-test` as test runner

* chore: Remove unused `example` crate + update wasm version
  • Loading branch information
matheus23 authored Mar 4, 2024
1 parent 74eb5dc commit 0ca6f34
Show file tree
Hide file tree
Showing 42 changed files with 2,310 additions and 403 deletions.
42 changes: 26 additions & 16 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,8 @@ jobs:
- name: Run Tests
run: cargo test --manifest-path car-mirror/Cargo.toml --all-features

run-headless-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
browser: [ firefox, chrome ]

# include:
# bug w/ wasm-bindgen: https://github.com/rustwasm/wasm-bindgen/issues/3004
# - os: macos-latest
# browser: safari
run-playwright-tests:
runs-on: ubuntu-latest

defaults:
run:
Expand All @@ -126,17 +116,37 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install cargo-binstall
uses: cargo-bins/[email protected]

- name: Install wasm-bindgen
run: cargo binstall wasm-bindgen-cli --version 0.2.91 -y

- name: Install wasm-opt (via binaryen)
run: sudo apt-get install -y binaryen

- name: Install NPM dependencies
run: npm i

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Cache Project (JavaScript)
uses: actions/setup-node@v4
with:
node-version: '18.x'

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: stable

- name: Run Rust Headless Browser Tests
run: wasm-pack test --headless --${{ matrix.browser }}
- name: Setup WebAssembly Toolchain
run: rustup target add wasm32-unknown-unknown

- name: Run Playwright tests
run: npm test
Loading

0 comments on commit 0ca6f34

Please sign in to comment.