mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-12-28 03:45:06 +00:00
Run CI on Windows
This commit is contained in:
parent
5c3af59ba6
commit
9dd1679e5a
5
.github/workflows/cargo-audit.yml
vendored
5
.github/workflows/cargo-audit.yml
vendored
@ -11,7 +11,10 @@ on:
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/audit-check@v1
|
||||
|
5
.github/workflows/cargo-clippy.yml
vendored
5
.github/workflows/cargo-clippy.yml
vendored
@ -6,7 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
15
.github/workflows/cargo-test.yml
vendored
15
.github/workflows/cargo-test.yml
vendored
@ -5,7 +5,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
test-linux:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- run: sudo apt update
|
||||
@ -26,3 +26,16 @@ jobs:
|
||||
with:
|
||||
command: test
|
||||
args: --all-features --no-fail-fast
|
||||
test-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all-features --no-fail-fast
|
||||
|
5
.github/workflows/cargo-udeps.yml
vendored
5
.github/workflows/cargo-udeps.yml
vendored
@ -6,7 +6,10 @@ on:
|
||||
|
||||
jobs:
|
||||
udeps:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
@ -25,7 +25,7 @@ tempfile = "3.1.0"
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
rand = "0.7.3"
|
||||
|
||||
[dev-dependencies]
|
||||
[target.'cfg(unix)'.dev-dependencies]
|
||||
assert_cmd = "1.0.1"
|
||||
|
||||
[profile.release]
|
||||
|
@ -41,6 +41,7 @@ pub enum Hook {
|
||||
Pwd,
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
@ -246,7 +246,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_add() {
|
||||
let path = "/foo/bar";
|
||||
let path = if cfg!(windows) {
|
||||
r"C:\foo\bar"
|
||||
} else {
|
||||
"/foo/bar"
|
||||
};
|
||||
let now = 946684800;
|
||||
|
||||
let data_dir = tempfile::tempdir().unwrap();
|
||||
@ -267,7 +271,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_remove() {
|
||||
let path = "/foo/bar";
|
||||
let path = if cfg!(windows) {
|
||||
r"C:\foo\bar"
|
||||
} else {
|
||||
"/foo/bar"
|
||||
};
|
||||
let now = 946684800;
|
||||
|
||||
let data_dir = tempfile::tempdir().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user