Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(env): remove error wrapper #29

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
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: 📦 Dependencies
labels:
- dependencies
- title: 🛠️ Build
labels:
- build
- title: 📌 Chore
labels:
- chore
- title: 💣 Breaking Changes
labels:
- breaking-change
- title: 🚀 Features
labels:
- feature
- title: 🐛 Bug Fixes
labels:
- bug
- title: 📝 Documentation
labels:
- doc
- title: 🧪 Tests
labels:
- test
- title: 📦 Dependencies
labels:
- dependencies
- title: 🛠️ Build
labels:
- build
- title: 📌 Chore
labels:
- chore
exclude:
labels: [ci]
52 changes: 26 additions & 26 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ concurrency:

on:
push:
branches: [main]
paths:
- "**.rs"
- Cargo.toml
branches: [main]
paths:
- '**.rs'
- Cargo.toml

jobs:
cache:
name: Cache
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}

- name: Build (debug)
uses: actions-rs/cargo@v1
with:
args: --all-features
command: build
- name: Build (debug)
uses: actions-rs/cargo@v1
with:
args: --all-features
command: build
116 changes: 58 additions & 58 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ on:
pull_request:
branches: [main]
paths:
- .github/workflows/quality.yml
- "**.rs"
- Cargo.toml
- .github/workflows/quality.yml
- '**.rs'
- Cargo.toml

jobs:
commit:
name: Commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install commitlint
run: npm install --global @commitlint/{cli,config-conventional}
- name: Install commitlint
run: npm install --global @commitlint/{cli,config-conventional}

- name: Lint
run: commitlint --from=HEAD~1
- name: Lint
run: commitlint --from=HEAD~1

quality:
name: Quality
Expand All @@ -44,54 +44,54 @@ jobs:
POSTGRES_PASSWORD: mockable
POSTGRES_USER: mockable
ports:
- 5432:5432
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy,rustfmt
- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy,rustfmt

- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}

- name: Check format
uses: actions-rs/cargo@v1
with:
args: --check
command: fmt
- name: Check format
uses: actions-rs/cargo@v1
with:
args: --check
command: fmt

- name: Lint
uses: actions-rs/cargo@v1
with:
args: --all-features --tests -- -D warnings
command: clippy
- name: Lint
uses: actions-rs/cargo@v1
with:
args: --all-features --tests -- -D warnings
command: clippy

- name: Initialize database
env:
PGPASSWORD: mockable
run: psql -h 127.0.0.1 -U mockable -d mockable -f ./docker-compose/db/init.sql
- name: Initialize database
env:
PGPASSWORD: mockable
run: psql -h 127.0.0.1 -U mockable -d mockable -f ./docker-compose/db/init.sql

- name: Test
uses: actions-rs/cargo@v1
with:
args: --all-features
command: test
- name: Test
uses: actions-rs/cargo@v1
with:
args: --all-features
command: test

- name: Test examples
uses: actions-rs/cargo@v1
with:
args: --all-features --examples
command: test
- name: Test examples
uses: actions-rs/cargo@v1
with:
args: --all-features --examples
command: test
58 changes: 29 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@ permissions:

on:
push:
tags: ["*"]
tags: ['*']

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

- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}
- name: Restore cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ steps.rust.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}

- name: Publish
uses: actions-rs/cargo@v1
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
with:
args: --all-features
command: publish
- name: Publish
uses: actions-rs/cargo@v1
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
with:
args: --all-features
command: publish

- name: Create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
- name: Create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
38 changes: 24 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: .rs$
- id: end-of-file-fixer
exclude: .rs$
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- id: cargo-check
- id: clippy
args: ["--tests", "--", "-D", "warnings"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
- id: check-yaml
- 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]
Loading
Loading