forked from ListenNotes/podcast-api-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.63 KB
/
Copy pathrust.yml
File metadata and controls
57 lines (51 loc) · 1.63 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
name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
fail-fast: false
matrix:
rust: ['1.88.0', stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install toolchain
run: rustup toolchain install "${{ matrix.rust }}" --profile minimal
- name: Test offline behavior and compile examples
run: cargo +${{ matrix.rust }} test --locked
- name: Check example
run: cargo +${{ matrix.rust }} check --locked --examples
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install formatting and lint tools
run: rustup toolchain install stable --profile minimal --component rustfmt,clippy
- run: cargo +stable fmt --all --check
- run: cargo +stable clippy --locked --all-targets -- -D warnings
- run: cargo +stable doc --locked --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: Verify standalone package
run: |
cargo +stable package --locked
package_dir=$(mktemp -d)
tar -xzf target/package/*.crate --strip-components=1 -C "$package_dir"
cd "$package_dir"
cargo +stable test --locked
mock-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup toolchain install stable --profile minimal
- name: Public mock only; no credentials
run: cargo +stable test --locked --test mock_integration -- --ignored --test-threads=1