Skip to content

Commit

Permalink
run cargo fmt and fix ci (#1)
Browse files Browse the repository at this point in the history
* run cargo fmt and fix ci

* remove miri and set MSRV to 1.76
  • Loading branch information
joshainglis authored Mar 11, 2024
1 parent 67a90d6 commit 75fac0b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 32 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Cargo Build & Test

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,16 +16,13 @@ jobs:
strategy:
matrix:
include:
- rust: 1.64.0 # MSRV
- rust: stable
features: unstable quickcheck rayon
test_all: --all
- rust: beta
test_all: --all
- rust: nightly
features: unstable quickcheck rayon
test_all: --all
bench: true
- rust: 1.76.0 # MSRV
- rust: stable
test_all: --all
- rust: beta
test_all: --all
- rust: nightly
test_all: --all
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
Expand All @@ -35,17 +32,10 @@ jobs:
override: true
- name: Build
run: |
cargo build --verbose --no-default-features
cargo build --verbose --features "${{ matrix.features }}"
cargo build --verbose
- name: Tests
run: |
cargo test --verbose --no-default-features
cargo test ${{ matrix.test_all }} --verbose --features "${{ matrix.features }}"
- name: Build benchmarks
if: ${{ matrix.bench }}
run: |
cargo bench --verbose --no-run
cargo bench --verbose --no-run --all-features
cargo test --verbose
rustfmt:
runs-on: ubuntu-latest
Expand All @@ -67,12 +57,3 @@ jobs:
- name: Rustfmt
if: matrix.rustfmt
run: cargo fmt -- --check

miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: cargo miri test
2 changes: 1 addition & 1 deletion src/exceptions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{fmt, io};
use std::error::Error;
use std::path::PathBuf;
use std::{fmt, io};

#[derive(Debug)]
pub enum TopCatError {
Expand Down
2 changes: 1 addition & 1 deletion src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ mod tests {
let d = append_string_to_file_content("SELECT 1 FROM table;".to_string(), ";");
assert_eq!(d, "SELECT 1 FROM table;\n");

let d = append_string_to_file_content("SELECT 1 FROM table;\n\n\n".to_string(), "\\");
let d = append_string_to_file_content("SELECT 1 FROM table;\n\n\n".to_string(), ";");
assert_eq!(d, "SELECT 1 FROM table;\n");
}
}

0 comments on commit 75fac0b

Please sign in to comment.