mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
name: Wasm
|
|
|
|
on: [push, pull_request]
|
|
#on:
|
|
# push:
|
|
# # Ignore commits created by bors
|
|
# branches-ignore:
|
|
# - 'staging'
|
|
# - 'trying'
|
|
# pull_request:
|
|
# branches-ignore:
|
|
# - 'staging'
|
|
# - 'trying'
|
|
|
|
env:
|
|
CI: 1
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
if: >-
|
|
${{ !contains(github.event.head_commit.message, 'chore: ') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# We explicitly do this to cache properly.
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
|
|
- name: Install wasm-pack
|
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16"
|
|
cache: "yarn"
|
|
|
|
- name: Install node dependencies
|
|
shell: bash
|
|
run: |
|
|
yarn
|
|
|
|
- name: Build
|
|
run: |
|
|
(cd crates/binding_core_wasm && yarn)
|
|
(cd crates/binding_core_wasm && ./scripts/build.sh --features plugin)
|
|
|
|
- name: Test
|
|
run: |
|
|
(cd crates/binding_core_wasm && ./scripts/test.sh)
|