Skip to content

Commit d0bf781

Browse files
committed
Merge branch 'ci' of https://github.com/swimos/swim-rust into dependabot/cargo/tokio-rustls-0.26
2 parents 212723d + de30b17 commit d0bf781

File tree

10 files changed

+143
-212
lines changed

10 files changed

+143
-212
lines changed

.github/workflows/ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches: main
5+
6+
name: Continuous integration
7+
env:
8+
latest_version: '1.78.0'
9+
10+
jobs:
11+
testlatest:
12+
name: Test Latest
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- windows-latest
18+
- ubuntu-latest
19+
- macos-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Install Rust
23+
uses: dtolnay/rust-toolchain@stable
24+
with:
25+
toolchain: ${{ env.latest_version }}
26+
- uses: Swatinem/rust-cache@v2
27+
- run: cargo test --all-features --workspace --lib --tests --profile "ci"
28+
29+
docs:
30+
name: Documentation
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Install Rust
35+
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
toolchain: ${{ env.latest_version }}
38+
- uses: Swatinem/rust-cache@v2
39+
- name: Build Documentation
40+
run: cargo doc --lib --no-deps --all-features --workspace
41+
env:
42+
RUSTDOCFLAGS: --cfg docsrs -Dwarnings
43+
44+
fmt:
45+
name: Rustfmt
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Install Rust
50+
uses: dtolnay/rust-toolchain@stable
51+
with:
52+
toolchain: ${{ env.latest_version }}
53+
components: rustfmt
54+
- uses: Swatinem/rust-cache@v2
55+
- run: cargo fmt --all -- --check
56+
57+
clippy:
58+
name: Clippy
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- name: Install Rust
63+
uses: dtolnay/rust-toolchain@stable
64+
with:
65+
toolchain: ${{ env.latest_version }}
66+
components: clippy
67+
- uses: Swatinem/rust-cache@v2
68+
- run: cargo clippy --all-features --all-targets --workspace -- -D warnings
69+
70+
code_coverage:
71+
name: Code Coverage
72+
runs-on: ubuntu-latest
73+
container:
74+
image: xd009642/tarpaulin:develop-nightly
75+
options: --security-opt seccomp=unconfined
76+
steps:
77+
- name: Checkout repository
78+
uses: actions/checkout@v2
79+
80+
- name: Install Clang
81+
# Required for rocksdb
82+
run: apt-get update && apt-get install -y llvm llvm-dev clang
83+
84+
- name: Set libclang path
85+
run: echo "LIBCLANG_PATH=$(llvm-config --libdir)" >> $GITHUB_ENV
86+
87+
- name: Generate code coverage
88+
run: |
89+
cargo +nightly tarpaulin --config .tarpaulin.toml
90+
91+
- name: Upload to codecov.io
92+
uses: codecov/codecov-action@v2
93+
with:
94+
token: ${{secrets.CODECOV_TOKEN}}
95+
fail_ci_if_error: true

.tarpaulin.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[coverage]
2+
exclude = [
3+
"example-util",
4+
"console",
5+
"console-views",
6+
"demand-lane",
7+
"demand-map-lane",
8+
"value-lane",
9+
"map-lane",
10+
"command-lane",
11+
"value-store",
12+
"map-store",
13+
"supply-lane",
14+
"value-lane-persistence",
15+
"map-lane-persistence",
16+
"value-store-persistence",
17+
"map-store-persistence",
18+
"event-downlink",
19+
"value-downlink",
20+
"map-downlink",
21+
"local-downlink",
22+
"http-lane",
23+
"transit",
24+
"transit-model",
25+
"tutorial-app",
26+
"tutorial-app-model",
27+
"tutorial-app-generator",
28+
"join_map",
29+
"join_value",
30+
"aggregations",
31+
"time_series",
32+
"swimos_form_derive",
33+
"swimos_agent_derive",
34+
"macro_utilities",
35+
]
36+
37+
workspace = true
38+
avoid-cfg-tarpaulin = true
39+
profile = "ci"
40+
ignore-tests = true
41+
output = ["xml"]
42+
timeout = "600s"
43+
all-features = true

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ regex = "1.3.6"
119119
fnv = "1.0.7"
120120
cursive = { default-features = false, version = "0.20" }
121121
duration-str = "0.11.2"
122-
quick-xml = "0.31.0"
122+
quick-xml = "0.32.0"
123123
csv = "1.2"
124124
serde-xml-rs = "0.6"
125125
axum = "0.6.20"

azure-pipelines.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

ci/azure-code-coverage.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

ci/azure-install-rust.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

ci/azure-install-sccache.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

ci/azure-lint.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

ci/azure-test-stable.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

swimos/src/agent.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ pub use swimos_agent_derive::{lifecycle, projections, AgentLaneModel};
139139
/// 6. [`crate::agent::lanes::HttpLane`] (or [`crate::agent::lanes::SimpleHttpLane`])
140140
///
141141
/// For [`crate::agent::lanes::ValueLane`] and [`crate::agent::lanes::CommandLane`], the type parameter
142-
/// must implement the [`crate::form::Form`] trait (used for serialization and deserialization). For
142+
/// must implement the [`Form`](https://docs.rs/swimos_form/latest/swimos_form/trait.Form.html) trait (used for serialization and deserialization). For
143143
/// [`crate::agent::lanes::MapLane`], [`crate::agent::lanes::JoinValueLane`] and [`crate::agent::lanes::JoinMapLane`],
144-
/// both parameters must implement [`crate::form::Form`] and additionally, the key type `K` must additionally
144+
/// both parameters must implement [`Form`](https://docs.rs/swimos_form/latest/swimos_form/trait.Form.html) and additionally, the key type `K` must additionally
145145
/// satisfy `K: Hash + Eq + Ord + Clone`.
146146
///
147147
/// Additionally, for [`crate::agent::lanes::JoinMapLane`], the link key type `L` must satisfy`L: Hash + Eq + Clone`.
@@ -156,7 +156,7 @@ pub use swimos_agent_derive::{lifecycle, projections, AgentLaneModel};
156156
/// For [`crate::agent::lanes::HttpLane`], the constraints on the type parameters are determined by the
157157
/// codec that is selected for the lane (using the appropriate type parameter). By default, this is the
158158
/// [`crate::agent::lanes::http::DefaultCodec`]. This codec always requires that type parameters implement
159-
/// [`crate::form::Form`] and, if the 'json' feature is active, that they are Serde serializable.
159+
/// [`Form`](https://docs.rs/swimos_form/latest/swimos_form/trait.Form.html) and, if the 'json' feature is active, that they are Serde serializable.
160160
///
161161
/// The supported store types are:
162162
///
@@ -192,7 +192,7 @@ pub use swimos_agent_derive::{lifecycle, projections, AgentLaneModel};
192192
/// stores types) will persist their state (where the server has a persistence store). To disable this, the lane
193193
/// field may be marked as transient with an attribute:
194194
///
195-
/// / ```no_run
195+
/// ```no_run
196196
/// use swimos::agent::AgentLaneModel;
197197
/// use swimos::agent::lanes::ValueLane;
198198
///

0 commit comments

Comments
 (0)