Skip to content

Commit

Permalink
Add test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Dec 17, 2022
1 parent 931be7c commit 2d4f318
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
assignees:
- alanvardy
152 changes: 152 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## Unreleased

## 2022-12-17 0.1.0

- Repo initialized
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
coverage:
status:
project:
default:
target: 0%
threshold: 0%
base: auto
patch:
default:
target: 80%
threshold: 2%
base: auto

0 comments on commit 2d4f318

Please sign in to comment.