Skip to content

Commit

Permalink
ci(mrml-wasm): create workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrouet committed Jul 25, 2023
1 parent de4091f commit db71911
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/mrml-wasm-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
on:
push:
paths:
- .github/workflows/mrml-wasm-*
- packages/mrml-wasm/**
- packages/mrml-core/**
- Cargo.lock
- Cargo.toml

defaults:
run:
working-directory: packages/mrml-wasm

env:
RUSTFLAGS: "-Dwarnings"

jobs:
code-checking:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}-mrml-wasm-code-checking
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt,clippy

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-mrml-wasm-code-checking-${{ hashFiles('**/Cargo.lock') }}

- name: run lint
run: cargo fmt --check

- name: run check
run: cargo check --all-features --tests

- name: run clippy
run: cargo clippy --all-targets --all-features --tests

testing:
runs-on: ubuntu-latest
container: rust:1-bullseye

concurrency:
group: ${{ github.ref }}-mrml-wasm-testing
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: jetli/[email protected]

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-mrml-wasm-testing-${{ hashFiles('**/Cargo.lock') }}

- name: run tests
run: wasm-pack test --node

0 comments on commit db71911

Please sign in to comment.