Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
leroyguillaume committed Jan 21, 2024
0 parents commit a276794
Show file tree
Hide file tree
Showing 15 changed files with 2,348 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
changelog:
categories:
- title: 💣 Breaking Changes
labels:
- breaking-change
- title: 🚀 Features
labels:
- feature
- title: 🐛 Bug Fixes
labels:
- bug
- title: 📝 Documentation
labels:
- doc
- title: 🧪 Tests
labels:
- test
- title: 🛠️ Build
labels:
- build
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

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

on:
push:
paths:
- '**/*.rs'
- Cargo.lock
- Cargo.toml

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main

- name: Set up Rust
uses: actions-rs/toolchain@master

- name: Build
run: cargo build --all-features

- name: Build examples
run: cargo build --examples
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

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

on:
push:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main

- name: Set up Python
uses: actions/setup-python@main
with:
cache: pip
python-version: '3'

- name: Run pre-commit
uses: pre-commit/action@main
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

permissions:
contents: write

on:
push:
tags: ['*']

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main

- name: Set up Rust
uses: actions-rs/toolchain@master

- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --all-features

- name: Create release
uses: softprops/action-gh-release@master
with:
generate_release_notes: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
- id: check-yaml
- id: pretty-format-json
args: [--autofix]
- id: trailing-whitespace
exclude: .rs$
- id: end-of-file-fixer
exclude: .rs$
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-yaml
args: [--autofix]
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
args: [--all-features]
- id: clippy
args: [--all-features, --tests, --, -D, warnings]
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributing

## Requirement

- [Rust](https://rustup.rs/)
- [pre-commit](https://pre-commit.com/)

## Getting started

```bash
git clone https://github.com/leroyguillaume/stream-consumer-task.git
cd stream-consumer-task
pre-commit install
```

## How to build

```bash
cargo build --all-features
```
Loading

0 comments on commit a276794

Please sign in to comment.