Skip to content

Commit

Permalink
ci: increase coverage (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad authored Nov 9, 2023
1 parent 0e021d1 commit e4501e3
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
- name: build
env:
RUSTFLAGS: -Cinstrument-coverage
run: cargo build --features inhibit --verbose
run: cargo build -p afrim-memory -p afrim-preprocessor -p afrim-translator -p afrim-config -p afrim --verbose

- name: test
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: name-%p-%m.profraw
run: cargo test --verbose
run: cargo test -p afrim-memory -p afrim-preprocessor -p afrim-translator -p afrim-config -p afrim --verbose

- name: Run grcov
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ jobs:
cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build --verbose
run: cargo build --all-features --verbose

- name: Run tests
run: |
cargo test --lib --bins --tests --verbose ${{matrix.extra}}
cargo test --benches ${{matrix.extra}}
- name: Run tests (minimal)
run: cargo test --no-default-features --lib --bins --tests --verbose ${{matrix.extra}}

- name: Run tests (normal)
run: cargo test --lib --bins --tests --verbose ${{matrix.extra}}

- name: Run tests (full)
run: cargo test --all-features --lib --bins --tests --verbose ${{matrix.extra}}

- name: Check compatibility with Wasm
run: |
rustup target add wasm32-unknown-unknown
cargo build -p afrim-translator -p afrim-preprocessor --target wasm32-unknown-unknown --all-features
35 changes: 35 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Web

on:
workflow_dispatch:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libxtst-dev libevdev-dev libxdo-dev
version: 1.0

- name: Add components
run: rustup component add clippy

- name: Add wasm target
run: rustup target add wasm32-unknown-unknown

- name: Clippy
run: cargo clippy -p afrim-translator -p afrim-memory -p afrim-preprocessor --target wasm32-unknown-unknown --all-features

- name: Build
run: cargo build -p afrim-translator -p afrim-memory -p afrim-preprocessor --target wasm32-unknown-unknown --all-features
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ members = [
"engine/preprocessor",
"engine/translator",
]
default-members = ["service"]
resolver = "2"

0 comments on commit e4501e3

Please sign in to comment.