fork of https://github.com/rustwasm/wasm-pack for the needs of NextGraph.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
62 lines
1.4 KiB
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
build: [linux-stable, macos-stable, windows-stable]
|
|
include:
|
|
- build: linux-stable
|
|
os: ubuntu-latest
|
|
rust: stable
|
|
- build: macos-stable
|
|
os: macos-latest
|
|
rust: stable
|
|
- build: windows-stable
|
|
os: windows-latest
|
|
rust: stable
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: nanasess/setup-chromedriver@master
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
targets: wasm32-unknown-unknown
|
|
- uses: actions/setup-node@v2
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v3
|
|
env:
|
|
cache-name: cache-dependencies
|
|
with:
|
|
path: |
|
|
~/.cargo/.crates.toml
|
|
~/.cargo/.crates2.json
|
|
~/.cargo/bin
|
|
~/.cargo/registry/index
|
|
~/.cargo/registry/cache
|
|
target
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
|
|
|
|
- name: Run Tests
|
|
run: cargo test --all --locked
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
- name: Clippy
|
|
run: cargo clippy
|
|
|
|
- name: Cargo fmt
|
|
run: cargo fmt --all -- --check
|
|
|