3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-04-29 14:45:53 +00:00

add some more tests

This commit is contained in:
Arpad Borsos 2022-07-09 17:17:14 +02:00
parent 86bae2494f
commit fffd6895b2
No known key found for this signature in database
GPG key ID: FC7BCA77824B3298
12 changed files with 185 additions and 1057 deletions

30
.github/workflows/coverage.yml vendored Normal file
View file

@ -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
.github/workflows/install.yml vendored Normal file
View file

@ -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

View file

@ -1,77 +0,0 @@
name: CI
on: [push, pull_request]
jobs:
simple:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test root check/test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: ./
with:
workspaces: tests
- run: |
cargo check
cargo test
working-directory: tests
install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test `cargo install` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: |
rustup toolchain install stable --profile minimal
rustup default stable
- uses: ./
- run: cargo install cargo-deny --locked
workspaces:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test multiple workspaces on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: |
rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown
rustup default stable
- uses: ./
with:
workspaces: |
tests
tests/wasm-workspace
- run: cargo check
working-directory: tests
- run: cargo check
working-directory: tests/wasm-workspace

30
.github/workflows/simple.yml vendored Normal file
View file

@ -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
.github/workflows/target-dir.yml vendored Normal file
View file

@ -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
.github/workflows/workspaces.yml vendored Normal file
View file

@ -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