Skip to content

Commit ffa417a

Browse files
authored
Switch to Github Actions (#65)
* Start with CI * Fix clippy errors * change tested crates
1 parent 10876c6 commit ffa417a

File tree

5 files changed

+67
-67
lines changed

5 files changed

+67
-67
lines changed

.github/workflows/rust.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Rust
2+
3+
on: [push]
4+
5+
jobs:
6+
style:
7+
name: Style Checks (stable/ubuntu-latest)
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@master
12+
- uses: hecrj/setup-rust-action@v1
13+
with:
14+
components: "rustfmt,clippy"
15+
- uses: actions/checkout@v1
16+
- name: Check code formatting
17+
run: cargo fmt --all -- --check
18+
- name: Check Clippy lints
19+
run: cargo clippy --all-targets --all-features -- -D warnings
20+
21+
compile:
22+
name: Compile (${{ matrix.rust_release }}/${{ matrix.os }})
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
matrix:
26+
rust_release: [nightly, stable]
27+
os: [ubuntu-latest, windows-latest, macOS-latest]
28+
29+
steps:
30+
- uses: actions/checkout@master
31+
- uses: hecrj/setup-rust-action@v1
32+
with:
33+
rust-version: ${{ matrix.rust_release }}
34+
- name: Build
35+
run: cargo build --verbose
36+
37+
integration_test:
38+
name: Integration Tests (stable/ubuntu-latest)
39+
runs-on: ubuntu-latest
40+
needs: [style, compile]
41+
services:
42+
influxdb:
43+
image: influxdb
44+
ports:
45+
- 8086:8086
46+
authed_influxdb:
47+
image: influxdb
48+
ports:
49+
- 9086:8086
50+
env:
51+
INFLUXDB_HTTP_AUTH_ENABLED: true
52+
INFLUXDB_ADMIN_USER: admin
53+
INFLUXDB_ADMIN_PASSWORD: password
54+
INFLUXDB_USER: nopriv_user
55+
INFLUXDB_USER_PASSWORD: password
56+
57+
steps:
58+
- uses: actions/checkout@v1
59+
- uses: actions-rs/toolchain@v1
60+
with:
61+
toolchain: nightly
62+
override: true
63+
- uses: actions-rs/cargo@v1
64+
with:
65+
command: test
66+
args: --package influxdb --package influxdb_derive --all-features --no-fail-fast

.travis.yml

-63
This file was deleted.

influxdb/src/error.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Errors that might happen in the crate
2-
use reqwest;
32
43
#[derive(Debug, Fail)]
54
pub enum Error {

influxdb/src/integrations/serde_integration.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
use reqwest::{Client as ReqwestClient, StatusCode, Url};
5050

5151
use serde::{de::DeserializeOwned, Deserialize};
52-
use serde_json;
5352

5453
use crate::{Client, Error, Query, ReadQuery};
5554

@@ -110,7 +109,7 @@ impl Client {
110109
return Err(error);
111110
}
112111
};
113-
url.query_pairs_mut().append_pair("q", &read_query.clone());
112+
url.query_pairs_mut().append_pair("q", &read_query);
114113

115114
if !read_query.contains("SELECT") && !read_query.contains("SHOW") {
116115
let error = Error::InvalidQueryError {

influxdb/tests/integration_tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use utilities::{
88

99
use influxdb::InfluxDbWriteable;
1010
use influxdb::{Client, Error, Query, Timestamp};
11-
use tokio;
1211

1312
/// INTEGRATION TEST
1413
///

0 commit comments

Comments
 (0)