Skip to content

Commit e596bb0

Browse files
committed
Add Gitlab CI and badges
1 parent 46910ed commit e596bb0

3 files changed

Lines changed: 51 additions & 2 deletions

File tree

.gitlab-ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
stages:
2+
- lint
3+
- test
4+
5+
cache:
6+
key:
7+
files:
8+
- Cargo.lock
9+
paths:
10+
- .cargo/
11+
- target/
12+
13+
clippy:
14+
stage: lint
15+
image: rust:latest
16+
script:
17+
- rustup component add clippy
18+
- cargo clippy -- -D warnings # Fail on warnings
19+
20+
rust-stable:
21+
stage: test
22+
image: rust:latest
23+
script:
24+
- cargo test --features test
25+
26+
rust-1_58:
27+
stage: test
28+
image: rust:1.58
29+
script:
30+
- cargo test --features test
31+
32+
rust-beta:
33+
stage: test
34+
image: instrumentisto/rust:beta
35+
script:
36+
- cargo test --features test
37+
38+
rust-nightly:
39+
stage: test
40+
image: rustlang/rust:nightly
41+
allow_failure: true # Allowed to fail
42+
script:
43+
- cargo test --features test

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "list-features"
3-
version = "0.1.0"
3+
version = "0.1.1-dev"
44
edition = "2021"
55
rust-version = "1.58"
66

@@ -14,4 +14,4 @@ repository = "https://framagit.org/dder/list-features"
1414
exclude = ["/.github/", "/.vscode/"]
1515

1616
[features]
17-
test = []
17+
test = [] # makes some private functions public for cargo test

readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# list-features
22

3+
[![crates.io](https://img.shields.io/crates/v/list-features.svg)](https://crates.io/crates/list-features)
4+
[![license](https://img.shields.io/crates/l/list-features.svg)](https://framagit.org/dder/list-features/blob/master/license.txt)
5+
[![docs.rs](https://docs.rs/list-features/badge.svg)](https://docs.rs/list-features)
6+
[![pipeline status](https://framagit.org/dder/list-features/badges/master/pipeline.svg)](https://framagit.org/dder/list-features/pipelines)
7+
[![rustc version](https://img.shields.io/badge/rustc-1.58+-lightgray.svg)](https://rust-lang.org)
8+
39
Extracts the list of enabled feature flags during compilation. These flags can then be saved and displayed at run-time.
410

511
## Highlights

0 commit comments

Comments
 (0)