Skip to content

Commit

Permalink
add some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jul 9, 2022
1 parent 86bae24 commit fffd689
Show file tree
Hide file tree
Showing 12 changed files with 188 additions and 1,060 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: coverage

on: [push, pull_request]

jobs:
coverage:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo-llvm-cov` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v2

- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview

- uses: taiki-e/install-action@cargo-llvm-cov

- uses: ./
with:
workspaces: tests

- run: cargo llvm-cov --all-features --workspace
working-directory: tests
25 changes: 25 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: install

on: [push, pull_request]

jobs:
install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo install` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v2

- run: rustup toolchain install stable --profile minimal

- uses: ./

- run: cargo install cargo-deny --locked
77 changes: 0 additions & 77 deletions .github/workflows/selftest.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: simple

on: [push, pull_request]

jobs:
simple:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test `cargo check/test` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v2

- run: rustup toolchain install stable --profile minimal

- uses: ./
with:
workspaces: tests

- run: |
cargo check
cargo test
working-directory: tests
29 changes: 29 additions & 0 deletions .github/workflows/target-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: target-dir

on: [push, pull_request]

jobs:
target-dir:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test custom target-dir on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v2

- run: rustup toolchain install stable --profile minimal

# the `workspaces` option has the format `$workspace -> $target-dir`
# and the `$target-dir` is relative to the `$workspace`.
- uses: ./
with:
workspaces: tests -> ../custom-target-dir

- run: cargo test --manifest-path tests/Cargo.toml --target-dir custom-target-dir
33 changes: 33 additions & 0 deletions .github/workflows/workspaces.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: workspaces

on: [push, pull_request]

jobs:
workspaces:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

name: Test multiple workspaces on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
CARGO_TERM_COLOR: always

steps:
- uses: actions/checkout@v2

- run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown

- uses: ./
with:
workspaces: |
tests
tests/wasm-workspace
- run: cargo check
working-directory: tests

- run: cargo check
working-directory: tests/wasm-workspace

0 comments on commit fffd689

Please sign in to comment.