Skip to content

Commit

Permalink
feat(ci): added test_ci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: rjtch <tchuinkoufongue@gmail.com>
  • Loading branch information
rjtch committed Feb 2, 2024
1 parent 7c12e52 commit ab3f106
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,35 @@ defaults:
shell: bash

jobs:
test:
name: Run unit tests
tests:
name: Run - test_${{ matrix.test_projects }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_projects:
- cargo_nextest
- cargo_check
- cargo_machete
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git/db/
key: ${{ runner.os }}-sdk-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sdk-rust-
- uses: taiki-e/install-action@v2
with:
tool: nextest,cargo-deny, cargo-msrv, cargo-machete
tool: nextest,cargo-deny, cargo-hack, cargo-machete
- name: Run test ${{ matrix.test_projects }}
run: make -f Makefile test_${{ matrix.test_projects }}
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ lint_cargo_toml_fmt_files:
lint_cargo_toml_check_files:
dprint check --config=tools/dprint/dprint.json

test_cargo_nextest:
cargo nextest run --all-features

test_cargo_check:
cargo hack check --each-feature --no-dev-deps

test_cargo_machete:
cargo machete --with-metadata

clean:
cargo clean

Expand Down

0 comments on commit ab3f106

Please sign in to comment.