From de873b4195ea9d7c3deea40fb3cd4e4c27c8d4ea Mon Sep 17 00:00:00 2001 From: Shawn Date: Wed, 23 Oct 2024 01:49:28 -0400 Subject: [PATCH] all --- .DS_Store | Bin 0 -> 6148 bytes .devcontainer/Dockerfile | 2 + .devcontainer/devcontainer.json | 15 ++++++ .github/workflows/CICD.yaml | 92 ++++++++++++++++++++++++++++++++ Cargo.toml | 7 +++ Makefile | 24 +++++++++ README.md | 34 +++++++++++- 7 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/CICD.yaml create mode 100644 Cargo.toml create mode 100644 Makefile diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..29b02e609f001381864e6455dffad005f85d1b4e GIT binary patch literal 6148 zcmeHKJ5Iwu5S<|@EYY~6+zU|T1|~8WAQwQ1B`6X(0@1sp;Xs^#Yr&fjV9O#U1-y}F z-|o!3we}UBT@lgsQ@0YSMWlio%Cik~v%LAt&N8wDs_n7b?E1rTR(C33+=V>KgY5Qq z6aM9Q=Fqq8cHeIisov|C*PHI`YMkv(WRLgbUHzP((x?CxpaN8Y3jA9I(6h~|^FWSN zfC^B7F9q!XP~e75;t=S+4h;ST0NOR)4RgO^1B(TKP2v!U2uy2TVl1o`UySOC&5>^shd`$z?sOn80;UU%3jBrwANOn~ A*Z=?k literal 0 HcmV?d00001 diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..120d58a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,2 @@ +# Dockerfile +FROM rust:latest \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f66c9e3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "Sample Rust", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer", // Updated to use rust-analyzer + "ms-azuretools.vscode-docker" // Added Docker extension + ] + } + }, + "postCreateCommand": "rustup update && rustup component add clippy && rustup component add rustfmt" +} \ No newline at end of file diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml new file mode 100644 index 0000000..d735da2 --- /dev/null +++ b/.github/workflows/CICD.yaml @@ -0,0 +1,92 @@ +name: CI/CD + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Check + run: make check + + - name: Format + run: make format + + - name: Test + run: make test + + - name: Release + run: cargo build --release + + - name: Upload Binary Artifact + uses: actions/upload-artifact@v4 #v3 is scheduled for deprecation Nov 30 2024 check marketplace + with: + name: Mini_PJT_7_Package_a_Rust_ISL + path: target/release/Mini_PJT_7_Package_a_Rust_ISL + +# from John + +# name: CI + +# on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main + +# jobs: +# build: +# runs-on: ubuntu-latest + +# env: +# WORKING_DIR: sqlite #change this to the rust project name you are developing. + +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 + +# - name: Install Rust +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: stable +# override: true + +# - name: Check +# run: cargo check +# working-directory: ${{ env.WORKING_DIR }} + +# - name: Format +# run: cargo fmt +# working-directory: ${{ env.WORKING_DIR }} + +# - name: Test +# run: cargo test +# working-directory: ${{ env.WORKING_DIR }} + +# - name: Release +# run: cargo build --release +# working-directory: ${{ env.WORKING_DIR }} + +# - name: Upload Binary Artifact +# uses: actions/upload-artifact@v4 #v3 is scheduled for deprecation Nov 30 2024 check marketplace +# with: +# name: RuSQLite CLI Binary +# path: ${{ env.WORKING_DIR }}/target/release/sqlite #change the /add to the name of your binary \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9a38522 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "Mini_PJT_7_Rust_ISL" +version = "0.1.0" +edition = "2021" + +[dependencies] +clap = { version = "4.5.20", features = ["derive"] } \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ee4c36b --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +rust-version: + @echo "Rust command-line utility versions:" + rustc --version #rust compiler + cargo --version #rust package manager + rustfmt --version #rust code formatter + rustup --version #rust toolchain manager + clippy-driver --version #rust linter + +format: + cargo fmt + +lint: + cargo clippy + +test: + cargo test + +run: + cargo run + +release: + cargo build + +all: format lint test run \ No newline at end of file diff --git a/README.md b/README.md index 2aadf61..1ba2dd2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,32 @@ -# Mini_PJT_7_Rust_Pilot_ISL -Mini_PJT_7_Rust_Pilot_ISL +# IDS-706 Data Engineering Assignment +## Mini Project 7 : Rust_Pilot_ISL + +#### Status(CI/CD) badge [![CI](https://github.com/nogibjj/Mini_PJT_6_Complex-SQL-Query-for-a-MySQL-Database/actions/workflows/CICD.yml/badge.svg)] +------ + +### Proejct Purpose + +- + +- + +----- + +### Requirements + +* ***Package a Python script with setuptools or a similar tool*** +* ***Include a user guide on how to install and use the tool*** + +### Deliverables + +* ***Package tool*** +* ***Written Guide*** +* ***If you choose to use Rust, prove the binary file as an artifact in CI/CD*** + +--------- +### + + +---------- +### Extract & Transform & Query +* Extract : The process retrieves two datasets(`HR_1.csv` \ No newline at end of file