Merge pull request #18 from QuartzLibrary/cli #55
This file contains hidden or 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: Automated Testing | |
| on: | |
| push: | |
| branches: ["*"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/.crates.toml | |
| ~/.cargo/.crates2.json | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| ~/.rustup/toolchains/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install WASM toolchain | |
| run: rustup target add wasm32-unknown-unknown | |
| - name: Check project | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Check project (WASM) | |
| # Note lack of --all-targets here because tests and examples are not wasm compatible | |
| run: cargo clippy --workspace --all-features --target wasm32-unknown-unknown -- -D warnings | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/.crates.toml | |
| ~/.cargo/.crates2.json | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| ~/.rustup/toolchains/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Test project | |
| run: RUST_BACKTRACE=1 cargo test --workspace --all-targets --all-features |