Skip to content

Commit e971242

Browse files
Add GitHub actions (#45)
* Add github actions workflow for CI Signed-off-by: Matthias Beyer <mail@beyermatthias.de> * Add github action to block fixup commits merging Signed-off-by: Matthias Beyer <mail@beyermatthias.de> * Fix doc-tests (cherry picked from commit ee72186) Co-authored-by: Oyami-Srk <hhx.xxm@gmail.com>
1 parent 025b342 commit e971242

3 files changed

Lines changed: 96 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
on: [push, pull_request]
2+
3+
name: CI
4+
5+
jobs:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
rust:
12+
- stable
13+
- beta
14+
- nightly
15+
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v2
19+
20+
- name: Install toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.rust }}
24+
override: true
25+
26+
- name: Run cargo check
27+
uses: actions-rs/cargo@v1
28+
with:
29+
command: check
30+
31+
test:
32+
needs: [check]
33+
name: Test Suite
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
rust:
38+
- stable
39+
- beta
40+
- nightly
41+
steps:
42+
- name: Checkout sources
43+
uses: actions/checkout@v2
44+
45+
- name: Install toolchain
46+
uses: actions-rs/toolchain@v1
47+
with:
48+
toolchain: ${{ matrix.rust }}
49+
override: true
50+
51+
- name: Run cargo test
52+
uses: actions-rs/cargo@v1
53+
with:
54+
command: test
55+
56+
clippy:
57+
needs: [check]
58+
name: Clippy
59+
runs-on: ubuntu-latest
60+
strategy:
61+
matrix:
62+
rust:
63+
- stable
64+
- beta
65+
- nightly
66+
steps:
67+
- name: Checkout sources
68+
uses: actions/checkout@v2
69+
70+
- name: Install toolchain
71+
uses: actions-rs/toolchain@v1
72+
with:
73+
toolchain: ${{ matrix.rust }}
74+
override: true
75+
76+
- name: Install clippy
77+
run: rustup component add clippy
78+
79+
- name: Run cargo clippy
80+
uses: actions-rs/cargo@v1
81+
with:
82+
command: clippy
83+
args: -- -D warnings
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: [pull_request]
2+
3+
name: Git Checks
4+
5+
jobs:
6+
block-fixup:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2.0.0
11+
- name: Block Fixup Commit Merge
12+
uses: 13rac1/block-fixup-merge-action@v2.0.0

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
//! }
5252
//!
5353
//! fn main() -> Result<(), confy::ConfyError> {
54-
//! let cfg = confy::load("my-app-name")?;
54+
//! let cfg = confy::load("my-app-name", None)?;
5555
//! Ok(())
5656
//! }
5757
//! ```

0 commit comments

Comments
 (0)