Fix for #10 Support for JS snippets #385
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cargo-test-and-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace | |
- name: rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: -- -D warnings | |
build-windows: | |
needs: [cargo-test-and-lint] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install target wasm32-unknown-unknown | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- name: cargo test (windows) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace | |
build-osx-x86: | |
needs: [cargo-test-and-lint] | |
runs-on: macos-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install target wasm32-unknown-unknown | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- name: cargo test (OSX x86) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace |