mirror of
https://github.com/Swatinem/rust-cache.git
synced 2024-11-26 17:56:08 +08:00
add some more tests
This commit is contained in:
parent
86bae2494f
commit
fffd6895b2
30
.github/workflows/coverage.yml
vendored
Normal file
30
.github/workflows/coverage.yml
vendored
Normal 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
25
.github/workflows/install.yml
vendored
Normal 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
|
77
.github/workflows/selftest.yml
vendored
77
.github/workflows/selftest.yml
vendored
@ -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
30
.github/workflows/simple.yml
vendored
Normal 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
29
.github/workflows/target-dir.yml
vendored
Normal 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
33
.github/workflows/workspaces.yml
vendored
Normal 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
|
979
tests/Cargo.lock
generated
979
tests/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -3,9 +3,8 @@ publish = false
|
||||
name = "rust-cache"
|
||||
version = "0.1.0"
|
||||
authors = ["Arpad Borsos <arpad.borsos@googlemail.com>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dev-dependencies]
|
||||
[dependencies]
|
||||
reqwest = "0.11.0"
|
||||
clap = "3"
|
||||
actix-web = { git = "https://github.com/actix/actix-web.git", rev = "bd26083f333ecf63e3eb444748250364ce124f5e" }
|
||||
proguard = { git = "https://github.com/getsentry/rust-proguard", rev = "4bc2cddd79cc8f7c9d14dda2f9f4c431e10c9424" }
|
||||
|
@ -1,3 +1,17 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
fn some_fn(input: bool) -> usize {
|
||||
if input {
|
||||
2 + 4
|
||||
} else {
|
||||
3.saturating_add(5)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn some_test() {
|
||||
assert_eq!(some_fn(true), 6);
|
||||
assert_eq!(some_fn(false), 8);
|
||||
}
|
||||
|
8
tests/wasm-workspace/Cargo.lock
generated
8
tests/wasm-workspace/Cargo.lock
generated
@ -631,9 +631,9 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.10.40"
|
||||
version = "0.10.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e"
|
||||
checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
@ -663,9 +663,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.74"
|
||||
version = "0.9.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1"
|
||||
checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cc",
|
||||
|
@ -1,9 +1,8 @@
|
||||
[package]
|
||||
publish = false
|
||||
name = "wasm-one"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
reqwest = "0.11.0"
|
||||
|
@ -1,9 +1,8 @@
|
||||
[package]
|
||||
publish = false
|
||||
name = "wasm-two"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
clap = "3"
|
||||
|
Loading…
Reference in New Issue
Block a user