Fixing the unit tests. #16
Workflow file for this run
This file contains 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
# If you're adding a new package, you'll need to duplicate this workflow for it. | |
name: wasm-splats CI | |
on: | |
push: | |
paths: | |
- 'wasm-splats/**' | |
- '.github/workflows/wasm-splats-ci.yml' | |
jobs: | |
test_and_lint: | |
name: Testing and Linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Install latest stable with wasm32-unknown-unknown | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
components: rustfmt, clippy | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features -- -Dwarnings | |
- name: Run wasm-splats tests | |
run: wasm-pack test --headless --chrome --firefox | |
working-directory: ./wasm-splats | |
pack: | |
name: Packaging for npm | |
runs-on: ubuntu-latest | |
needs: [ test_and_lint ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install latest stable with wasm32-unknown-unknown | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
targets: wasm32-unknown-unknown | |
components: rustfmt, clippy | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build wasm-splats | |
run: wasm-pack build ./wasm-splats --release --target web --scope cesium | |
# TODO: Get rid of this when I no longer need it. | |
# - name: Pack wasm-splats | |
# run: wasm-pack publish ./wasm-splats/pkg |