Skip to content

Merge pull request #124 from parcel-bundler/alsh/fixing-lint-error #269

Merge pull request #124 from parcel-bundler/alsh/fixing-lint-error

Merge pull request #124 from parcel-bundler/alsh/fixing-lint-error #269

Workflow file for this run

name: test
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node-version: [12.x, 14.x]
name: ${{ matrix.os }}-${{ matrix.node-version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
# Caching
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ matrix.node-version }}
- uses: bahmutov/npm-install@v1.1.0
- name: Transpile JavaScript
run: yarn run transpile
- name: Build node release
run: yarn run build:node-release
- name: Run node tests
run: yarn run test:node
- name: Run rust tests
run: cargo test --all-features
test-wasm:
name: wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
# Caching
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-14.x
- uses: bahmutov/npm-install@v1.1.0
- name: Transpile JavaScript
run: yarn run transpile
- name: Build wasm release
run: yarn run build:wasm-node-release
- name: Run wasm tests
run: yarn run test:wasm