leo/.github/workflows/wasm.yml
2021-09-23 18:59:36 +03:00

48 lines
1.2 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- master
- staging
- trying
paths-ignore:
- 'docs/**'
- 'documentation/**'
env:
RUST_BACKTRACE: 1
jobs:
test-wasm-parser:
name: Test Package ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: wasm
strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]
include:
- os: ubuntu-latest
sccache-path: /home/runner/.cache/sccache
- os: macos-latest
sccache-path: /Users/runner/Library/Caches/Mozilla.sccache
- os: windows-latest
sccache-path: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache"
env:
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ${{ matrix.sccache-path }}
# SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install wasm-pack
run: npm install -g wasm-pack
- name: Run wasm-pack
run: wasm-pack build --dev --target nodejs
- name: Install dependencies and run tests
run: cd tests && npm ci && npm test