Skip to content

Commit 7a0dcaf

Browse files
authored
[ci]: github actions (#179)
* docs(http client): tokio 0.2 -> tokio 1.0 * [ci]: remove travis * [ci]: add github actions. * [ci]: fix identation nits * [ci]: use cache for actions * [ci]: filter to clippy * [ci]: remove hacks * separate action for ci and benchmarks
1 parent abe0d98 commit 7a0dcaf

File tree

4 files changed

+164
-20
lines changed

4 files changed

+164
-20
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
target-branch: "v2"
6+
schedule:
7+
interval: "daily"
8+
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
target-branch: "v2"
12+
schedule:
13+
interval: "daily"

.github/workflows/benchmarks.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Benchmarks
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
bench:
9+
name: Run benchmarks daily
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Sources
13+
uses: actions/checkout@v2
14+
15+
- name: Install Rust stable toolchain
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
profile: minimal
19+
toolchain: stable
20+
override: true
21+
22+
- name: Cache Dependencies & Build Outputs
23+
uses: actions/cache@v2
24+
with:
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
target
29+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+
31+
- name: Store benchmark result
32+
uses: rhysd/github-action-benchmark@v1
33+
with:
34+
tool: 'cargo'
35+
output-file-path: output.txt
36+
fail-on-alert: true
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
comment-on-alert: true
39+
alert-comment-cc-users: '@niklasad1, @maciejhirsz'
40+
auto-push: true

.github/workflows/ci.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Continuous integration
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- v2
8+
9+
jobs:
10+
check-style:
11+
name: Check style
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Install Rust stable toolchain
17+
uses: actions-rs/toolchain@v1
18+
with:
19+
profile: minimal
20+
toolchain: stable
21+
override: true
22+
components: rustfmt, clippy
23+
24+
- name: Cache Dependencies & Build Outputs
25+
uses: actions/cache@v2
26+
with:
27+
path: |
28+
~/.cargo/registry
29+
~/.cargo/git
30+
target
31+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32+
33+
- name: Cargo fmt
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: fmt
37+
args: --all -- --check
38+
39+
- name: Cargo clippy
40+
uses: actions-rs/cargo@v1
41+
with:
42+
command: clippy
43+
args: -- -A clippy::mutable_key_type
44+
45+
check-code:
46+
name: Check
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- name: Install Rust stable toolchain
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
profile: minimal
55+
toolchain: stable
56+
override: true
57+
58+
- name: Cache Dependencies & Build Outputs
59+
uses: actions/cache@v2
60+
with:
61+
path: |
62+
~/.cargo/registry
63+
~/.cargo/git
64+
target
65+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
66+
67+
- name: Cargo check no-default-features
68+
uses: actions-rs/cargo@v1
69+
with:
70+
command: check
71+
args: --benches --tests
72+
73+
- name: Cargo check all-features
74+
uses: actions-rs/cargo@v1
75+
with:
76+
command: check
77+
args: --benches --tests --all-features
78+
79+
tests:
80+
name: Run tests
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Checkout sources
84+
uses: actions/checkout@v2
85+
86+
- name: Install Rust stable toolchain
87+
uses: actions-rs/toolchain@v1
88+
with:
89+
profile: minimal
90+
toolchain: stable
91+
override: true
92+
93+
- name: Cache Dependencies & Build Outputs
94+
uses: actions/cache@v2
95+
with:
96+
path: |
97+
~/.cargo/registry
98+
~/.cargo/git
99+
target
100+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
101+
102+
- name: Cargo build
103+
uses: actions-rs/cargo@v1
104+
with:
105+
command: build
106+
args: --workspace
107+
108+
- name: Cargo test
109+
uses: actions-rs/cargo@v1
110+
with:
111+
command: test

.travis.yml

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

0 commit comments

Comments
 (0)