-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): add call config.toml logic
- Loading branch information
Showing
27 changed files
with
843 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# How to Contribute | ||
|
||
We welcome any kind of contributions. Whether you are reporting a bug, coding a feature or correcting a typo. Every effort counts; and all contributions are greatly appreaciated. | ||
|
||
### Testing Code | ||
|
||
To run all tests, run the following command. | ||
|
||
```sh | ||
cargo test --all | ||
|
||
``` | ||
|
||
|
||
### Linting Code | ||
|
||
### Debugging Code | ||
|
||
### Commit Messages | ||
|
||
Use a [conventional](https://github.com/ajoslin/conventional-changelog/blob/a5505865ff3dd710cf757f50530e73ef0ca641da/conventions/angular.md) changelog format so the changelog can be updated automatically using [clog](https://github.com/clog-tool/clog-cli) | ||
|
||
* Please format your commit subject line using the following format: `TYPE(COMPONENT): MESSAGE` where `TYPE` is one of the following: | ||
- `feat` - A new feature of an existing API | ||
- `imp` - An improvement to an existing feature/API | ||
- `perf` - A performance improvement | ||
- `docs` - Changes to documentation only | ||
- `tests` - Changes to the testing framework or tests only | ||
- `fix` - A bug fix | ||
- `refactor` - Code functionality doesn't change, but underlying structure may | ||
- `style` - Stylistic changes only, no functionality changes | ||
- `wip` - A work in progress commit (Should typically be `git rebase`'ed away) | ||
- `chore` - Catch all or things that have to do with the build system, etc | ||
- `examples` - Changes to existing example, or a new example | ||
* The `COMPONENT` is optional, and may be a single file, directory, or logical component. Parenthesis can be omitted if you are opting not to use the `COMPONENT`. | ||
|
||
### Tests and Documentation | ||
|
||
1. Create tests for your changes | ||
2. **Ensure the tests are passing.** Run the tests (`cargo test --all`), alternatively `just run-tests` if you have `just` installed. | ||
3. **Optional** Run the lints. | ||
4. Ensure your changes contain documentation if adding new APIs or features. | ||
|
||
### Preparing the PR | ||
|
||
|
||
1. `git rebase` into concise commits and remove `--fixup`s or `wip` commits (`git rebase -i HEAD~NUM` where `NUM` is number of commits back to start the rebase) | ||
2. Push your changes back to your fork (`git push origin $your-branch`) | ||
3. Create a pull request against `master`! (You can also create the pull request first, and we'll merge when ready. This a good way to discuss proposed changes.) | ||
|
||
### Goals | ||
|
||
* Remain backwards compatible when possible. | ||
Backward compatibility is not critical since projects do not depend on Rust Starter. But it's a good idea to have stable features and usage. | ||
* Reduce dependencies. | ||
* Follow best practices. | ||
* Ease of use and customization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Please use the following template to assist with creating an issue and to ensure a speedy resolution. If an area is not applicable, feel free to delete the area or mark with `N/A` | ||
--> | ||
|
||
### Rust Version | ||
|
||
* Use the output of `rustc -V` | ||
|
||
### Affected Version of clap | ||
|
||
* Can be found in Cargo.lock of your project (i.e. `grep clap Cargo.lock`) | ||
|
||
### Bug or Feature Request Summary | ||
|
||
|
||
### Expected Behavior Summary | ||
|
||
|
||
### Actual Behavior Summary | ||
|
||
|
||
### Steps to Reproduce the issue | ||
|
||
|
||
### Sample Code or Link to Sample Code | ||
|
||
|
||
### Debug output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Security audit | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: omarabid-forks/rs-audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Source | ||
id: checkout-source | ||
uses: actions/checkout@v2 | ||
- name: Set variables | ||
id: vars | ||
run: | | ||
echo "::set-output name=package_name::$(sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" | ||
echo "::set-output name=package_version::$(sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1)" | ||
- run: | | ||
echo "${{steps.vars.outputs.package_name}}" | ||
echo "${{steps.vars.outputs.package_version}}" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Build | ||
id: build-release | ||
run: cargo build --release | ||
|
||
- name: Zip release | ||
id: zip-release | ||
run: zip -j build.zip target/release/call | ||
|
||
- name: Artifact Production | ||
id: create-artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build | ||
path: build.zip | ||
|
||
- name: Remove Same Release | ||
uses: omarabid-forks/action-rollback@stable | ||
continue-on-error: true | ||
with: | ||
tag: ${{ steps.vars.outputs.package_version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
id: create-release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{steps.vars.outputs.package_version}} | ||
release_name: Version ${{steps.vars.outputs.package_version}} | ||
body: ${{steps.vars.outputs.package_name}} - ${{steps.vars.outputs.package_version}} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Artifact | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create-release.outputs.upload_url }} | ||
asset_path: build.zip | ||
asset_name: build.zip | ||
asset_content_type: application/zip | ||
|
||
- uses: omarabid-forks/purge-artifacts@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
expire-in: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: [push] | ||
|
||
name: Code Coverage | ||
|
||
jobs: | ||
codecov: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: omarabid-forks/rs-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run cargo-tarpaulin | ||
uses: omarabid-forks/[email protected] | ||
with: | ||
version: '0.9.0' | ||
args: '-- --test-threads 1' | ||
|
||
- name: Upload to codecov.io | ||
uses: omarabid-forks/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: code-coverage-report | ||
path: cobertura.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Linter | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: rustup component add clippy | ||
- uses: omarabid-forks/rs-clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: omarabid-forks/rs-toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run cargo test | ||
uses: omarabid-forks/rs-cargo@v1 | ||
with: | ||
command: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
on: push | ||
name: TOC Generator | ||
jobs: | ||
generateTOC: | ||
name: TOC Generator | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: omarabid-forks/toc-generator@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/target | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
**/target/ | ||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
.DS_Store | ||
|
||
# The cache for docker container dependency | ||
.cargo | ||
|
||
# The cache for chain data in container | ||
.local | ||
|
||
# direnv cache | ||
.direnv | ||
|
||
.idea/ | ||
Call.yml | ||
**/expand.rs | ||
.local/Call.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
exclude: '^docs/.github/.local' | ||
repos: | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: master | ||
hooks: | ||
- id: fmt | ||
- id: cargo-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
reorder_imports = true | ||
hard_tabs = true | ||
max_width = 120 | ||
wrap_comments = true | ||
comment_width = 100 | ||
wrap_comments = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +0,0 @@ | ||
## 0.2.0 (June 6, 2021) | ||
|
||
#### FEATURES: | ||
|
||
* add template support | ||
|
||
#### IMPROVEMENTS: | ||
|
||
#### BUG FIXES: | ||
|
||
|
||
|
||
#### BREAKING CHANGES: | ||
|
||
## 0.1.2 (May 6, 2021) | ||
|
||
#### FEATURES: | ||
|
||
#### IMPROVEMENTS: | ||
|
||
#### BUG FIXES: | ||
|
||
* Fix bin name bug | ||
|
||
#### BREAKING CHANGES: | ||
|
||
|
||
## 0.1.0 (May 5, 2021) | ||
|
||
### First release | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
|
||
- Create an `issue and describe` your idea | ||
- Fork it! | ||
- Create your feature branch: git checkout -b my-new-feature | ||
- Create your feature branch: git checkout -b feat-some-idea | ||
- Add files to the staging area : `git add .` | ||
- Commit your changes: `git commit -am 'Add some feature'` | ||
- Push to the branch: `git push origin my-new-feature` | ||
- Submit a pull request to main branch | ||
|
||
- Push to the branch: `git push origin feat-some-idea` | ||
- Submit a pull request to master branch |
Oops, something went wrong.