Repository navigation
52 lines (48 loc) · 1.65 KB
/
Copy pathci.yml
File metadata and controls
52 lines (48 loc) · 1.65 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
name: ci
on:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: ["1.90.0", stable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
# Preserve compiled dependencies even if tests or linting fail.
cache-on-failure: true
- run: cargo fmt --all --check
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
- run: cargo clippy --locked --all-targets --all-features -- -D warnings
- run: cargo test --locked
- name: Windows installer tests
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
shell: powershell
run: ./tests/install.ps1
- name: PowerShell 7 installer tests
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
shell: pwsh
run: ./tests/install.ps1
- name: End-to-end scenarios
if: matrix.os != 'windows-latest'
shell: bash
run: |
if [ "$RUNNER_OS" = macOS ]; then
brew install gnu-sed
fi
cargo build --locked
bash tests/e2e.sh target/debug/twokey