Skip to content

patch

patch #134

Workflow file for this run

name: πŸ”Ž Test Crates
on:
push:
branches: main
paths: ['**','!**/*.md']
pull_request:
branches: main
paths: ['**','!**/*.md']
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Build and Test
strategy:
matrix:
# os: [windows-latest, ubuntu-latest, macos-latest]
os: [ubuntu-latest] # 1x gh minutes
# os: [windows-latest] # 2x gh minutes
# os: [macos-latest] # 10x gh minutes
runs-on: ${{ matrix.os }}
steps:
- name: πŸ“‚ Checkout
uses: actions/checkout@v4
- name: πŸ“‚ Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: πŸ”¨ Install Cygwin
uses: cygwin/cygwin-install-action@master
if: runner.os == 'Windows'
with:
install-dir: C:\tools\cygwin
- name: πŸ”¨ Install Bevy Dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev mold
- name: πŸ”¨ Install Just
uses: extractions/setup-just@v1
- name: πŸ”¨ Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
default: true
# components: rustfmt, clippy
# - name: πŸ”¨ Install Chromedriver
# uses: nanasess/setup-chromedriver@v2
# - name: πŸ”¨ Install Wasm Target
# run: rustup target add wasm32-unknown-unknown
# - name: πŸ”¨ Install Wasm Bindgen
# uses: baptiste0928/cargo-install@v2
# with:
# crate: wasm-bindgen-cli
# version: '0.2.88'
# - name: πŸ”¨ Build Crates
# run: just all build
# - name: πŸ”Ž Test Fantoccini
# run: just run sweet fantoccini
- name: πŸ”Ž Test Native
run: cargo test --workspace --lib
# - name: πŸ”Ž Test Wasm - Windows # TODO sweet not compiling since cli added
# if: runner.os == 'Windows'
# run: just test-all-wasm-no-bevy
# - name: πŸ”Ž Test Wasm - Linux & MacOS
# if: runner.os != 'Windows'
# run: just test-all-wasm