Skip to content

Commit 426fdd9

Browse files
authored
release: v0.1 (#2)
Signed-off-by: Alex Chi <[email protected]>
1 parent 250c46e commit 426fdd9

File tree

3 files changed

+63
-8
lines changed

3 files changed

+63
-8
lines changed

.github/workflows/ci.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
fmt:
16+
runs-on: ubuntu-20.04
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: nightly
23+
components: rustfmt, clippy
24+
- name: Check code format
25+
uses: actions-rs/cargo@v1
26+
with:
27+
command: fmt
28+
args: --all -- --check
29+
- name: Clippy
30+
uses: actions-rs/cargo@v1
31+
with:
32+
command: clippy
33+
args: --workspace --all-targets -- -D warnings
34+
35+
test:
36+
runs-on: ubuntu-20.04
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: actions-rs/toolchain@v1
40+
with:
41+
profile: minimal
42+
toolchain: nightly
43+
- name: Build
44+
uses: actions-rs/cargo@v1
45+
with:
46+
command: build
47+
args: --workspace --all-features --all-targets
48+
- name: Test
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: test
52+
args: --workspace --no-fail-fast --all-features

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlplannertest"
3-
version = "0.0.0"
3+
version = "0.1.0"
44
edition = "2021"
55
description = "A yaml-based SQL planner test framework."
66
license = "MIT OR Apache-2.0"

src/test_runner.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,16 @@ where
9494
ChangeTag::Insert => ("+", Style::new().green()),
9595
ChangeTag::Equal => (" ", Style::new()),
9696
};
97-
print!(
98-
"{}{} {}{}",
99-
style(Line(change.old_index())).dim(),
100-
style(Line(change.new_index())).dim(),
101-
sty.apply_to(sign).bold(),
102-
sty.apply_to(change)
103-
);
97+
98+
if args.nocapture {
99+
print!(
100+
"{}{} {}{}",
101+
style(Line(change.old_index())).dim(),
102+
style(Line(change.new_index())).dim(),
103+
sty.apply_to(sign).bold(),
104+
sty.apply_to(change)
105+
);
106+
}
104107
}
105108

106109
if generated_result != expected_result {

0 commit comments

Comments
 (0)