chore: Remove unused dependencies & files #105
Workflow file for this run
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: 🧪 Tests and Checks | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '**' ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
# minimum version | |
- 1.75 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Smarter caching action, speeds up build times compared to regular cache: | |
# https://github.com/Swatinem/rust-cache | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
# Widely adopted suite of Rust-specific boilerplate actions, especially | |
# toolchain/cargo use: https://actions-rs.github.io/ | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
components: rustfmt, clippy | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Check Format | |
uses: actions-rs/cargo@v1 | |
with: | |
args: --all -- --check | |
command: fmt | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Run Linter | |
uses: actions-rs/cargo@v1 | |
with: | |
args: --all -- -D warnings | |
command: clippy | |
toolchain: ${{ matrix.rust-toolchain }} | |
# Check for security advisories. | |
- name: Check Advisories | |
if: ${{ matrix.rust-toolchain == 'stable' }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check advisories | |
continue-on-error: true | |
# Audit licenses, unreleased crates, and unexpected duplicate versions. | |
- name: Check Bans, Licenses, and Sources | |
if: ${{ matrix.rust-toolchain == 'stable' }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check bans licenses sources | |
- name: Install wasm-pack | |
if: ${{ matrix.rust-toolchain == 'stable' }} && github.event_name == 'push' }} | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
# Only "test" release build on push event. | |
- name: Test Release | |
if: ${{ matrix.rust-toolchain == 'stable' }} && github.event_name == 'push' }} | |
run: | | |
cargo build --manifest-path car-mirror/Cargo.toml --release | |
cd car-mirror-wasm && wasm-pack build --target web --release | |
run-cargo-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust-toolchain: | |
- stable | |
- nightly | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
toolchain: ${{ matrix.rust-toolchain }} | |
- name: Run Tests | |
run: cargo test --manifest-path car-mirror/Cargo.toml --all-features | |
run-playwright-tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./car-mirror-wasm | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Install cargo-binstall | |
uses: cargo-bins/[email protected] | |
- name: Install wasm-bindgen | |
run: cargo binstall wasm-bindgen-cli --version 0.2.91 -y | |
- name: Install wasm-opt (via binaryen) | |
run: sudo apt-get install -y binaryen | |
- name: Install NPM dependencies | |
run: npm i | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Cache Project | |
uses: Swatinem/rust-cache@v2 | |
- name: Cache Project (JavaScript) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
toolchain: stable | |
- name: Setup WebAssembly Toolchain | |
run: rustup target add wasm32-unknown-unknown | |
- name: Run Playwright tests | |
run: npm test |