Skip to content

Commit a523f20

Browse files
committed
CI and CI badge.
1 parent 497378b commit a523f20

File tree

4 files changed

+96
-0
lines changed

4 files changed

+96
-0
lines changed

.github/workflow/CI.yaml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
rust:
19+
- stable
20+
- beta
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Install ${{ matrix.rust }} Rust
26+
uses: actions-rs/toolchain@v1
27+
with:
28+
profile: minimal
29+
toolchain: ${{ matrix.rust }}
30+
override: true
31+
32+
- name: Run cargo build --all-targets --all-features
33+
uses: actions-rs/cargo@v1
34+
with:
35+
command: build
36+
args: --all-targets --all-features
37+
38+
- name: Run cargo test --all-features
39+
uses: actions-rs/cargo@v1
40+
with:
41+
command: test
42+
args: --all-features
43+
44+
rustfmt:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v2
49+
50+
- name: Install stable Rust with rustfmt
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
profile: minimal
54+
toolchain: stable
55+
override: true
56+
components: rustfmt
57+
58+
- name: Run cargo fmt --all -- --check
59+
uses: actions-rs/cargo@v1
60+
with:
61+
command: fmt
62+
args: --all -- --check
63+
64+
clippy:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v2
69+
70+
- name: Install stable Rust with clippy
71+
uses: actions-rs/toolchain@v1
72+
with:
73+
profile: minimal
74+
toolchain: stable
75+
override: true
76+
components: clippy
77+
78+
- name: Run cargo clippy --all-features
79+
uses: actions-rs/cargo@v1
80+
with:
81+
command: clippy
82+
args: --all-features -- -D warnings
83+
84+
- name: Run cargo clippy --no-default-features
85+
if: always()
86+
uses: actions-rs/cargo@v1
87+
with:
88+
command: clippy
89+
args: --no-default-features -- -D warnings

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- `fetch` feature: when enabled, exposes `Resources::fetch()` that allows
1212
retrieving up to 16 resources with a one-liner.
13+
- CI badge.
1314

1415
## [1.0.0](https://github.com/Ratysz/resources/compare/0.2.1..1.0.0) - 2020-03-17
1516
### Changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
[![Latest Version]][crates.io]
33
[![Documentation]][docs.rs]
44
[![License]](LICENSE.md)
5+
[![CI]][CI link]
56

67
[Latest Version]: https://img.shields.io/crates/v/resources.svg
78
[crates.io]: https://crates.io/crates/resources
89
[Documentation]: https://docs.rs/resources/badge.svg
910
[docs.rs]: https://docs.rs/resources
1011
[License]: https://img.shields.io/crates/l/resources.svg
12+
[CI]: https://github.com/Ratysz/resources/workflows/CI/badge.svg?branch=master
13+
[CI link]: https://github.com/Ratysz/resources/actions?query=workflow%3ACI
1114

1215
This crate provides the `Resources` struct:
1316
a container that stores at most one value of each specific type,

src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
//! [![Latest Version]][crates.io]
22
//! [![Documentation]][docs.rs]
33
//! [![License]][license link]
4+
//! [![CI]][CI link]
45
//!
56
//! [Latest Version]: https://img.shields.io/crates/v/resources.svg
67
//! [crates.io]: https://crates.io/crates/resources
78
//! [Documentation]: https://docs.rs/resources/badge.svg
89
//! [docs.rs]: https://docs.rs/resources
910
//! [License]: https://img.shields.io/crates/l/resources.svg
1011
//! [license link]: https://github.com/Ratysz/resources/blob/master/LICENSE.md
12+
//! [CI]: https://github.com/Ratysz/resources/workflows/CI/badge.svg?branch=master
13+
//! [CI link]: https://github.com/Ratysz/resources/actions?query=workflow%3ACI
1114
//!
1215
//! This crate provides the [`Resources`](struct.Resources.html) struct:
1316
//! a container that stores at most one value of each specific type,

0 commit comments

Comments
 (0)