Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: increase test coverage #115

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"

Loading