mirror of
https://github.com/thilo-behnke/wasm-pong.git
synced 2026-05-09 05:36:35 +00:00
39 lines
916 B
YAML
39 lines
916 B
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-pong-lib:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build
|
|
run: |
|
|
cd pong
|
|
cargo build --verbose
|
|
- name: Run tests
|
|
run: |
|
|
cd pong
|
|
cargo test --verbose
|
|
build-wasm-wrapper:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Prepare
|
|
run: |
|
|
(test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
|
(test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
|
|
cargo install-update -a
|
|
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
|
|
- name: Build
|
|
run: wasm-pack build
|
|
- name: Run tests
|
|
run: wasm-pack test
|