Skip to content

Use camino to simplify path handling #269

Use camino to simplify path handling

Use camino to simplify path handling #269

Workflow file for this run

name: Check code-quality
on:
pull_request:
push:
branches:
- master
jobs:
check-native:
needs: check-wasm
name: Check code-quality
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
rust:
- 1.72.0
fail-fast: true
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/env
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Source cargo environment
run: |
[[ -f ~/.cargo/env ]] && source ~/.cargo/env || true
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
default: true
components: clippy, rustfmt
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- name: Run cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features -- -D warnings
- name: Run cargo clippy on tests
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --tests --workspace --all-features -- -D warnings
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
check-wasm:
name: Check WASM compatibility
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
matrix:
rust:
- 1.72.0
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/env
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Source cargo environment
run: |
[[ -f ~/.cargo/env ]] && source ~/.cargo/env || true
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
default: true
components: clippy, rustfmt
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build wasm
run: wasm-pack build --target web --no-default-features