Skip to content

Commit

Permalink
feat: add subprojects
Browse files Browse the repository at this point in the history
  • Loading branch information
appcypher committed Oct 3, 2024
1 parent a0d92fc commit c04a741
Show file tree
Hide file tree
Showing 28 changed files with 1,183 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default
* @appcypher
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: "\U0001F41B bug"
assignees: ''

---

# Summary

## Problem

Describe the immediate problem.

### Impact

What's the impact of this bug?

## Solution

Describe the sort of fix that would solve the issue.

# Detail

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**

Add any other context about the problem here.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: "\U0001F497 enhancement"
assignees: ''

---

NB: Feature requests will only be considered if they solve a pain or present a useful refactoring of the code.

# Summary

## Problem

Describe the pain that this feature will solve.

### Impact

Describe the impact of not having this feature.

## Solution

Describe the solution.

# Detail

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Link to issue

Please add a link to any relevant issues/tickets.

## Type of change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Refactor (non-breaking change that updates existing functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Comments have been added/updated

Please delete options that are not relevant.

## Test plan (required)

Demonstrate the code is solid. Which commands did you test with and what are the expected results?
Which tests have you added or updated? Do the tests cover all of the changes included in this PR?

## Screenshots/Screencaps

Please add previews of any UI Changes.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: "cargo"
directory: "/"
commit-message:
prefix: "chore"
include: "scope"
target-branch: "main"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "chore(ci)"
include: "scope"
target-branch: "main"
schedule:
interval: "weekly"
17 changes: 17 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🛡 Audit-Check

on:
schedule:
- cron: '0 0 * * *'

jobs:
security-audit:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run Audit-Check
uses: rustsec/audit-check@v1.3.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
104 changes: 104 additions & 0 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: 🧪 Tests and Checks

on:
push:
branches: [ main ]

pull_request:
branches: [ '**' ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain:
- stable
- nightly
# minimum version
- "1.75"
steps:
- name: Checkout Repository
uses: actions/checkout@v4

# Smarter caching action, speeds up build times compared to regular cache:
# https://github.com/Swatinem/rust-cache
- name: Cache Project
uses: Swatinem/rust-cache@v2

# Widely adopted suite of Rust-specific boilerplate actions, especially
# toolchain/cargo use: https://actions-rs.github.io/
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
override: true
components: rustfmt, clippy
toolchain: ${{ matrix.rust-toolchain }}

- name: Check Format
uses: actions-rs/cargo@v1
with:
args: --all -- --check
command: fmt
toolchain: ${{ matrix.rust-toolchain }}

- name: Run Linter
uses: actions-rs/cargo@v1
with:
args: --all -- -D warnings
command: clippy
toolchain: ${{ matrix.rust-toolchain }}

# Check for security advisories
- name: Check Advisories
if: ${{ matrix.rust-toolchain == 'stable' }}
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
continue-on-error: true

# Audit licenses, unreleased crates, and unexpected duplicate versions.
- name: Check Bans, Licenses, and Sources
if: ${{ matrix.rust-toolchain == 'stable' }}
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources

# Only "test" release build on push event.
- name: Test Release
if: ${{ matrix.rust-toolchain == 'stable' && github.event_name == 'push' }}
run: cargo build --release

run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust-toolchain:
- stable
- nightly
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Environment Packages
run: |
sudo apt-get update -qqy
sudo apt-get install jq
- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
override: true
toolchain: ${{ matrix.rust-toolchain }}

- name: Run Tests
run: cargo test --all-features
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# These are backup files generated by rustfmt
**/*.rs.bk

# Other files + dirs
private
*.temp
*.tmp
.history
.DS_Store
57 changes: 57 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# See https://pre-commit.com for more information
# pre-commit install
# pre-commit install --hook-type commit-msg
exclude: ^(LICENSE|LICENSE*)
repos:
- repo: local
hooks:
- id: fmt
name: fmt
description: Format rust files.
entry: cargo +nightly fmt
language: system
types: [rust]
args: ["--", "--check"]
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: system
types: [rust]
pass_filenames: false
- id: clippy
name: clippy
description: Lint via clippy
entry: cargo clippy
language: system
args: ["--", "-D", "warnings"]
types: [rust]
pass_filenames: false

- repo: https://github.com/DevinR528/cargo-sort
rev: v1.0.9
hooks:
- id: cargo-sort
args: []

- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages:
- commit-msg

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: no-commit-to-branch
args: ["-b", "main"]
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- id: detect-private-key
- id: check-executables-have-shebangs
- id: check-toml
2 changes: 2 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
edition = "2021"
imports_granularity = "Crate"
Empty file added CHANGELOG.md
Empty file.
Loading

0 comments on commit c04a741

Please sign in to comment.