Skip to content

Switch to Github Actions #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Rust

on: [push]

jobs:
style:
name: Style Checks (stable/ubuntu-latest)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- uses: hecrj/setup-rust-action@v1
with:
components: "rustfmt,clippy"
- uses: actions/checkout@v1
- name: Check code formatting
run: cargo fmt --all -- --check
- name: Check Clippy lints
run: cargo clippy --all-targets --all-features -- -D warnings

compile:
name: Compile (${{ matrix.rust_release }}/${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_release: [nightly, stable]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@master
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust_release }}
- name: Build
run: cargo build --verbose

integration_test:
name: Integration Tests (stable/ubuntu-latest)
runs-on: ubuntu-latest
needs: [style, compile]
services:
influxdb:
image: influxdb
ports:
- 8086:8086
authed_influxdb:
image: influxdb
ports:
- 9086:8086
env:
INFLUXDB_HTTP_AUTH_ENABLED: true
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: password
INFLUXDB_USER: nopriv_user
INFLUXDB_USER_PASSWORD: password

steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --package influxdb --package influxdb_derive --all-features --no-fail-fast
63 changes: 0 additions & 63 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion influxdb/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//! Errors that might happen in the crate
use reqwest;

#[derive(Debug, Fail)]
pub enum Error {
Expand Down
3 changes: 1 addition & 2 deletions influxdb/src/integrations/serde_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
use reqwest::{Client as ReqwestClient, StatusCode, Url};

use serde::{de::DeserializeOwned, Deserialize};
use serde_json;

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

Expand Down Expand Up @@ -110,7 +109,7 @@ impl Client {
return Err(error);
}
};
url.query_pairs_mut().append_pair("q", &read_query.clone());
url.query_pairs_mut().append_pair("q", &read_query);

if !read_query.contains("SELECT") && !read_query.contains("SHOW") {
let error = Error::InvalidQueryError {
Expand Down
1 change: 0 additions & 1 deletion influxdb/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use utilities::{

use influxdb::InfluxDbWriteable;
use influxdb::{Client, Error, Query, Timestamp};
use tokio;

/// INTEGRATION TEST
///
Expand Down