-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (65 loc) · 2.25 KB
/
Copy pathci.yml
File metadata and controls
70 lines (65 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@451ce45ce31d200b52705aadd15ce75018b006de # 1.89.0
with:
components: clippy,rustfmt
- name: Install cargo-audit 0.22.2
run: cargo install cargo-audit --version '=0.22.2' --locked --no-default-features
- name: Audit Rust dependencies
run: cargo audit --deny warnings
- run: cargo fmt --check
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
- run: cargo build --release --locked
windows:
runs-on: windows-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Validate PowerShell installer syntax
shell: pwsh
run: |
$tokens = $null
$errors = $null
foreach ($script in @("./bootstrap.ps1", "./install-windows.ps1", "./tests/bootstrap.Tests.ps1", "./tests/bootstrap.Uninstall.Tests.ps1")) {
$errors = $null
[void][System.Management.Automation.Language.Parser]::ParseFile(
(Resolve-Path $script),
[ref]$tokens,
[ref]$errors
)
if ($errors.Count -gt 0) {
$errors | Format-List | Out-String | Write-Error
exit 1
}
}
- name: Test bootstrap JSONC and migration fixtures
shell: pwsh
run: ./tests/bootstrap.Tests.ps1
- name: Test bootstrap uninstall
shell: pwsh
run: ./tests/bootstrap.Uninstall.Tests.ps1
- uses: dtolnay/rust-toolchain@451ce45ce31d200b52705aadd15ce75018b006de # 1.89.0
with:
components: clippy,rustfmt
- run: cargo check --tests --locked
- run: cargo clippy --all-targets --locked -- -D warnings
- run: cargo test --locked
- run: cargo build --release --locked