-
-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (71 loc) · 2.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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