-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (73 loc) · 2.14 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
on: [push, pull_request]
name: CI
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Enable Rust build cache
uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: |
cargo check
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Enable Rust build cache
uses: Swatinem/rust-cache@v2
- name: Run cargo test
run: |
cargo test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
- name: Enable Rust build cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
- name: Run cargo clippy
run: |
cargo clippy -- -D warnings
- name: Run cargo rdme
run: |
cargo install cargo-rdme
cargo rdme --check
release:
name: Release
if: github.repository == 'Idein/msgpack-schema' && github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Run cargo publish
run: |
cargo publish --no-verify -p msgpack-schema-impl || :
cargo publish --no-verify -p msgpack-value || :
sleep 15
cargo publish --no-verify -p msgpack-schema || :