diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a5db745 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 + +updates: +- package-ecosystem: cargo + directory: "/" + schedule: + interval: daily + assignees: + - alanvardy diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..90589ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,152 @@ +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +name: ci + +jobs: + check: + name: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-index- + - name: cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-check-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-registry-check- + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + + test: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-test-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-index-test- + - name: cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-test-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-registry-test- + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + + coverage: + name: coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-coverage-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-index-coverage- + - name: cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-registry- + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: cargo install cargo-tarpaulin + - run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml + - name: Upload to codecov.io + uses: codecov/codecov-action@v1 + + fmt: + name: rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-fmt-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-index-fmt- + - name: cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-registry- + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: cache cargo index + uses: actions/cache@v1 + with: + path: ~/.cargo/git + key: cargo-index-clippy-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-index-clippy- + - name: cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + cargo-registry- + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7eba084 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## Unreleased + +## 2022-12-17 0.1.0 + +- Repo initialized diff --git a/README.md b/README.md new file mode 100644 index 0000000..f765fe1 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# GPTO (Geppetto) + +[![Build Status](https://github.com/alanvardy/gpto/workflows/ci/badge.svg)](https://github.com/alanvardy/gpto) [![codecov](https://codecov.io/gh/alanvardy/gpto/branch/master/graph/badge.svg?token=9FBJK1SU0K)](https://codecov.io/gh/alanvardy/gpto) [![Crates.io](https://img.shields.io/crates/v/gpto.svg)](https://crates.io/crates/gpto) + +An Unofficial OpenAI GPT3 Terminal Client diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..b6bce0e --- /dev/null +++ b/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + target: 0% + threshold: 0% + base: auto + patch: + default: + target: 80% + threshold: 2% + base: auto