Skip to content

Commit 7e7740d

Browse files
committed
chore: enable workflows
1 parent 0bf0054 commit 7e7740d

File tree

5 files changed

+71
-11
lines changed

5 files changed

+71
-11
lines changed

.github/workflows/audit-check.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: Security audit
22

33
on:
4-
# TODO re-enable once project is set up properly
5-
#push:
4+
push:
65
#schedule:
76
# - cron: '0 0 * * *'
87
workflow_dispatch:

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: CI
22

33
on:
4-
# TODO re-enable once project is set up properly
5-
#push:
4+
push:
65
workflow_dispatch:
76

87
env:
@@ -14,7 +13,7 @@ jobs:
1413
strategy:
1514
fail-fast: false
1615
matrix:
17-
all-features: [ false ] # TODO if your crate has optional features, add 'true' to this list
16+
all-features: [ false, true ]
1817
runs-on: ubuntu-latest
1918
steps:
2019
- name: Checkout code
@@ -64,9 +63,9 @@ jobs:
6463
strategy:
6564
fail-fast: false
6665
matrix:
67-
toolchain: [ 1.60.0 ] # TODO: change for your minimum supported Rust version
66+
toolchain: [ 1.56.1 ]
6867
os: [ ubuntu, macos, windows ]
69-
all-features: [ false ] # TODO if your crate has optional features, add 'true' to this list
68+
all-features: [ false, true ]
7069
runs-on: ${{ matrix.os }}-latest
7170
steps:
7271
- name: Checkout code
@@ -106,10 +105,10 @@ jobs:
106105
strategy:
107106
fail-fast: false
108107
matrix:
109-
toolchain: [ 1.68.2, stable, beta, nightly ] # TODO: change 1.68.2 for your minimum supported Rust version
108+
toolchain: [ 1.56.1, stable, beta, nightly ]
110109
os: [ ubuntu, macos, windows ]
111110
ignore-lock: [ false, true ]
112-
all-features: [ false ] # TODO if your crate has optional features, add 'true' to this list
111+
all-features: [ false, true ]
113112
include:
114113
- experimental: false
115114
- toolchain: beta
@@ -147,10 +146,10 @@ jobs:
147146
strategy:
148147
fail-fast: false
149148
matrix:
150-
toolchain: [ 1.68.2, stable, beta, nightly ] # TODO: change 1.68.2 for your minimum supported Rust version
149+
toolchain: [ 1.56.1, stable, beta, nightly ]
151150
os: [ ubuntu, macos, windows ]
152151
ignore-lock: [ false, true ]
153-
all-features: [ false ] # TODO if your crate has optional features, add 'true' to this list
152+
all-features: [ false, true ]
154153
include:
155154
- experimental: false
156155
- toolchain: beta

Cargo.lock.msrv

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml.msrv

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "rust-template-output"
3+
version = "0.1.0"
4+
edition = "2021"
5+
default-run = "rust-template-output"
6+
7+
[features]
8+
test_feature_1 = []
9+
10+
[dependencies]
11+
12+
[build-dependencies]
13+
rustc_version = "0.4.0"

src/lib.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ pub fn hello() -> &'static str {
1010
"Hello, World!"
1111
}
1212

13+
/// Returns a string for feature!
14+
///
15+
/// ```
16+
/// use rust_template_output::for_feature;
17+
///
18+
/// let foo = for_feature();
19+
/// assert!(!foo.is_empty());
20+
/// ```
21+
#[cfg(feature = "test_feature_1")]
22+
pub fn for_feature() -> &'static str {
23+
"For feature!"
24+
}
25+
1326
#[cfg(test)]
1427
mod tests {
1528
use super::*;
@@ -19,4 +32,15 @@ mod tests {
1932
let foo = hello();
2033
assert!(!foo.is_empty());
2134
}
35+
36+
#[cfg(feature = "test_feature_1")]
37+
mod for_feature {
38+
use super::*;
39+
40+
#[test]
41+
fn test_for_feature_one() {
42+
let foo = for_feature();
43+
assert!(!foo.is_empty());
44+
}
45+
}
2246
}

0 commit comments

Comments
 (0)