ruffle/.github/workflows/test_web.yml

68 lines
1.9 KiB
YAML
Raw Normal View History

name: Test Web
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
2021-02-01 03:07:36 +00:00
name: Test Node.js ${{ matrix.node_version }} / Rust ${{ matrix.rust_version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust_version == 'nightly' }}
strategy:
fail-fast: false
matrix:
# We most likely don't care about rust versions here, we'll catch those issues in "test rust"
2021-02-01 03:07:36 +00:00
node_version: ['12', '14']
rust_version: ['stable']
# MIKE: Turning off macOS-latest for now (flaky tests on CI)
os: [ubuntu-latest, windows-latest]
steps:
2021-02-01 03:07:36 +00:00
- uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
2021-02-01 03:07:36 +00:00
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_version }}
target: wasm32-unknown-unknown
2021-02-03 18:45:44 +00:00
# wasm-bindgen-cli version must match wasm-bindgen crate version.
# Be sure to update in release_nightly.yml, web/Cargo.toml and web/README.md.
- name: Install wasm-bindgen
run: cargo install wasm-bindgen-cli --version 0.2.69
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: binaryen
2021-02-03 18:45:44 +00:00
# conda is available only with "shell: bash -l {0}".
# See https://github.com/marketplace/actions/setup-miniconda.
- name: Install binaryen
2021-02-03 18:45:44 +00:00
shell: bash -l {0}
run: conda install -c conda-forge binaryen
2021-02-01 03:07:36 +00:00
- name: Build
working-directory: web
2021-02-03 18:45:44 +00:00
shell: bash -l {0}
run: |
npm run bootstrap
npm run build
2021-02-01 03:07:36 +00:00
- name: Run tests
working-directory: web
run: npm test
- name: Check formatting
working-directory: web
run: npm run lint