Skip to content

Commit

Permalink
Combined CI files
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBloom committed Feb 29, 2024
1 parent fadbd90 commit 31afb94
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 50 deletions.
67 changes: 52 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

35 changes: 0 additions & 35 deletions .github/workflows/coverage.yml

This file was deleted.

0 comments on commit 31afb94

Please sign in to comment.