-
-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (74 loc) · 2.35 KB
/
ci.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/ci.yml'
- 'openstack_cli/**'
- 'openstack_sdk/**'
- 'openstack_tui/**'
- 'structable_derive/**'
- 'fuzz/**'
env:
CARGO_TERM_COLOR: always
NEXTEST_RETRIES: 3
jobs:
test:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
# - target: x86_64-unknown-linux-musl
# os: ubuntu-latest
# - target: x86_64-apple-darwin
# os: macos-latest
# - target: x86_64-pc-windows-msvc
# os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install cargo-nextest
uses: taiki-e/install-action@acd25891978b4cdaebd139d3efef606d26513b14 # v2.47.0
with:
tool: cargo-nextest
- name: Rust Cache
uses: swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: Run tests
run: cargo nextest run
- name: Run Doc tests
run: cargo test --doc
fuzz:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # stable
with:
toolchain: nightly
- name: Rust Cache
uses: swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: Install cargo-fuzz
run: |
cargo install cargo-fuzz
- name: Run tests
run: cargo fuzz run fuzz_openstack_sdk_config --features=fuzzing -- -max_total_time=60