-
Notifications
You must be signed in to change notification settings - Fork 34
41 lines (38 loc) · 1.06 KB
/
rust.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
---
name: Rust compile & test
on:
push:
branches:
- develop
pull_request:
branches:
- develop
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- run: cargo check --tests --benches
- run: cargo build --verbose
- run: cargo clippy -- -D warnings
- name: Run tests (Native)
run: cargo nextest run --verbose --release
- name: Run tests (WASM)
run: wasm-pack test --release --headless --chrome
- name Upload test results
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: target/nextest/default/junit.xml