Skip to content

Commit 1fbf271

Browse files
committed
chore(ci): WIP setup cmd tests
1 parent 018450c commit 1fbf271

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@ jobs:
2323
test:
2424
name: Test
2525

26-
runs-on: ubuntu-latest
2726
strategy:
2827
matrix:
2928
toolchain:
3029
- stable
30+
platform:
31+
- ubuntu-latest
32+
- windows-latest
33+
fail-fast: false
34+
35+
runs-on: ${{ matrix.platform }}
3136

3237
permissions:
3338
contents: read
@@ -42,6 +47,8 @@ jobs:
4247
with:
4348
toolchain: ${{ matrix.toolchain }}
4449

50+
- uses: cargo-bins/cargo-binstall@b9bf4400702f721d469eec4d280125f650c85638
51+
4552
- name: Get cache key
4653
run: |
4754
CARGO_VERSION=$(cargo --version)
@@ -54,6 +61,7 @@ jobs:
5461
echo "EOF"
5562
} >> "$GITHUB_OUTPUT"
5663
id: cache-key
64+
shell: bash
5765

5866
- uses: actions/cache/restore@v4
5967
with:

utils/rust-analyzer/src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fs, io, os::unix::fs::PermissionsExt, path::PathBuf, time::Duration};
1+
use std::{fs, io, path::PathBuf, time::Duration};
22

33
use anyhow::Result;
44
use flate2::write::GzDecoder;
@@ -53,10 +53,13 @@ impl Download {
5353
.finish()?;
5454

5555
#[cfg(any(target_os = "macos", target_os = "linux"))]
56-
fs::metadata(path)?
57-
.permissions()
58-
.tap_mut(|p| p.set_mode(0o755))
59-
.pipe(|p| fs::set_permissions(path, p))?;
56+
{
57+
use std::os::unix::fs::PermissionsExt;
58+
fs::metadata(path)?
59+
.permissions()
60+
.tap_mut(|p| p.set_mode(0o755))
61+
.pipe(|p| fs::set_permissions(path, p))?;
62+
}
6063

6164
Ok(())
6265
}

0 commit comments

Comments
 (0)