Skip to content

Commit e774d86

Browse files
Richard BaahRichard Baah
authored andcommitted
Added lots of configuration and documentation to start the project
1 parent 1e86945 commit e774d86

File tree

9 files changed

+84
-15
lines changed

9 files changed

+84
-15
lines changed

.github/workflows/go-test.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ on:
77
branches: [ main ]
88

99
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.24'
20+
21+
- name: Run golangci-lint
22+
uses: golangci/golangci-lint-action@v6
23+
with:
24+
version: latest
25+
working-directory: ./src/Backend/opti-sql-go
26+
1027
test:
1128
runs-on: ubuntu-latest
1229

@@ -16,16 +33,23 @@ jobs:
1633
- name: Set up Go
1734
uses: actions/setup-go@v5
1835
with:
19-
go-version: '1.21'
36+
go-version: '1.24'
2037

2138
- name: Run tests
2239
working-directory: ./src/Backend/opti-sql-go
2340
run: go test -v ./...
2441

25-
- name: Run tests with coverage
26-
working-directory: ./src/Backend/opti-sql-go
27-
run: go test -v -coverprofile=coverage.out ./...
42+
race:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v5
50+
with:
51+
go-version: '1.24'
2852

29-
- name: Display coverage
53+
- name: Run tests with race detector
3054
working-directory: ./src/Backend/opti-sql-go
31-
run: go tool cover -func=coverage.out
55+
run: go test -race -v ./...

.github/workflows/rust-test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Rust Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Rust
17+
uses: actions-rust-lang/setup-rust-toolchain@v1
18+
with:
19+
toolchain: stable
20+
components: clippy, rustfmt
21+
22+
- name: Run clippy
23+
working-directory: ./src/Backend/opti-sql-rs
24+
run: cargo clippy --all-targets --all-features -- -D warnings
25+
26+
- name: Check formatting
27+
working-directory: ./src/Backend/opti-sql-rs
28+
run: cargo fmt -- --check
29+
30+
test:
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up Rust
37+
uses: actions-rust-lang/setup-rust-toolchain@v1
38+
with:
39+
toolchain: stable
40+
41+
- name: Run tests
42+
working-directory: ./src/Backend/opti-sql-rs
43+
run: cargo test --verbose
44+

src/Backend/opti-sql-go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module opti-sql-go
22

3-
go 1.25.0
3+
go 1.24.0
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use datafusion::arrow::record_batch::RecordBatch;
1+
//use datafusion::arrow::record_batch::RecordBatch;
22
mod project;
3-
fn main(){
3+
#[allow(dead_code)]
4+
fn main() {
45
println!("Hello, world!");
56
project::project_exec::project_execute();
67
project::source::csv::read_csv();
7-
8-
}
8+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub mod source; // folder = "source"
2-
pub mod project_exec; // file = "project_exec.rs"
1+
pub mod project_exec;
2+
pub mod source; // folder = "source" // file = "project_exec.rs"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
pub fn read_csv() {
32
println!("Reading CSV...");
43
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pub mod csv;
22
pub mod json;
3-
pub mod parquet;
3+
pub mod parquet;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[allow(dead_code)]
12
pub fn read_parquet() {
23
println!("Reading CSV...");
34
}

0 commit comments

Comments
 (0)