Repository navigation
fix package name #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Browser Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| workflow_call: | |
| jobs: | |
| test-chrome: | |
| name: Test on Chrome | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private repos | |
| run: | | |
| git config --global user.name "bstruct" | |
| git config --global user.email "git@bstruct.com" | |
| git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build and test with Chrome | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| run: wasm-pack test --headless --chrome | |
| test-firefox: | |
| name: Test on Firefox | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private repos | |
| run: | | |
| git config --global user.name "bstruct" | |
| git config --global user.email "git@bstruct.com" | |
| git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build and test with Firefox | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| run: wasm-pack test --headless --firefox | |
| test-safari: | |
| name: Test on Safari (WebKit) | |
| runs-on: macos-latest | |
| continue-on-error: true | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private repos | |
| run: | | |
| git config --global user.name "bstruct" | |
| git config --global user.email "git@bstruct.com" | |
| git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build and test with Safari | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| run: wasm-pack test --headless --safari | |
| rust-tests: | |
| name: Rust Unit Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private repos | |
| run: | | |
| git config --global user.name "bstruct" | |
| git config --global user.email "git@bstruct.com" | |
| git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-test- | |
| - name: Run Rust tests | |
| run: cargo test --verbose | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| report: | |
| name: Test Report | |
| needs: [test-chrome, test-firefox, test-safari, rust-tests] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Report status | |
| run: | | |
| echo "Browser tests completed" | |
| echo "Check individual job results for details" |