diff --git a/.github/workflows/cargo.yaml b/.github/workflows/cargo.yaml new file mode 100644 index 00000000..f6b4d219 --- /dev/null +++ b/.github/workflows/cargo.yaml @@ -0,0 +1,28 @@ +name: cargo +on: + push: + pull_request: + +env: + RUSTFLAGS: "-Dwarnings" + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true +jobs: + clippy_check: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Run Clippy + run: cargo clippy --all-targets --all-features + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - run: cargo test + - run: cargo test --release + - run: cargo fmt --check \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..343b7f12 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +/target +### Rust template +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +**/.DS_Store + +.idea \ No newline at end of file diff --git a/.rultor.yml b/.rultor.yml new file mode 100644 index 00000000..9db1c4ac --- /dev/null +++ b/.rultor.yml @@ -0,0 +1,26 @@ +architect: + - h1alexbel +docker: + image: yegor256/rultor-image:1.13.0 +assets: + credentials: l3r8yJ/home#assets/crates-credentials +install: | + pdd --file=/dev/null +merge: + script: | + cargo --color=never test -vv + cargo --color=never fmt --check + cargo doc --no-deps + cargo clippy +release: + script: |- + [[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1 + sed -i -e "s/^version = \"0.0.0\"/version = \"${tag}\"/" Cargo.toml + sed -i -e "s/0.0.0/${tag}/" src/lib.rs + cargo --color=never test -vv -- --nocapture + cargo --color=never fmt --check + cargo clippy --all-targets --all-features + git commit -am "${tag}" + ls -a ../ + mkdir -p ~/.cargo && cp ../credentials ~/.cargo + cargo --color=never publish \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..d9e04071 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "fakehub" +version = "0.0.0" +edition = "2021" +license = "MIT" +description = """ +GitHub API Server Stub. +There are many applications that use GitHub API for different purposes. +All of them need to create automated tests, which need to mock the API server somehow. +Would be nice to have a fully functioning mock version of a GitHub API, which would support all functions, +but work locally, with absolutely no connection to GitHub. +""" +authors = ["Aliaksei BialĂ­auski ", "Ivanchuk Ivan "] + +[dependencies] +clippy = "0.0.302" +serde = "1.0.203" +anyhow = "1.0.86" diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..382ac040 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,17 @@ +Copyright (c) 2024 Aliaksei BialĂ­auski + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE +AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..e69de29b diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..860259ac --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +disallowed-names = ["not-jeff"] \ No newline at end of file diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..1927fea7 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ] +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 00000000..e7a11a96 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}