-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fadbd90
commit 31afb94
Showing
2 changed files
with
52 additions
and
50 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,27 @@ name: Troupe CI | |
|
||
on: | ||
push: | ||
branches: [ main, development ] | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main, development ] | ||
branches: [ main ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
native_builds: | ||
name: Native Tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable, beta, nightly] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
code_cleaniness_checks: | ||
name: Formatting Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hecrj/setup-rust-action@v2 | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@v2 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
rust-version: nightly | ||
components: rustfmt | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt --check | ||
- run: cargo build --verbose | ||
- run: cargo test --verbose | ||
- run: cargo test --no-default-features --features async-std --verbose | ||
- run: cargo doc --verbose | ||
wasm_build: | ||
needs: code_cleaniness_checks | ||
name: Wasm Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -44,3 +38,46 @@ jobs: | |
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
- run: wasm-pack test --headless --chrome --firefox --verbose | ||
- run: cargo doc --target wasm32-unknown-unknown --verbose | ||
native_builds: | ||
needs: code_cleaniness_checks | ||
name: Native Tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
rust: [stable, beta, nightly] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: hecrj/setup-rust-action@v2 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
components: rustfmt | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt --check | ||
- run: cargo build --verbose | ||
- run: cargo test --verbose | ||
- run: cargo test --no-default-features --features async-std --verbose | ||
- run: cargo doc --verbose | ||
coverage: | ||
needs: [native_builds, wasm_build] | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust | ||
uses: hecrj/setup-rust-action@v2 | ||
with: | ||
rust-version: stable | ||
- name: Fetch Tarpaulin | ||
uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-tarpaulin | ||
version: 'latest' | ||
- name: Generate code coverage | ||
run: | | ||
cargo tarpaulin --verbose --workspace --timeout 120 --out Xml | ||
- name: Report coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.