Skip to content

Commit

Permalink
repo cleanup (#11)
Browse files Browse the repository at this point in the history
* feat: workflows

* feat: rustfmt.toml

* feat: README

* edit: gitignore
  • Loading branch information
Autoparallel authored Mar 19, 2024
1 parent 3387157 commit bdf0e72
Show file tree
Hide file tree
Showing 6 changed files with 393 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: lint
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main]
jobs:
fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: cargo fmt
run: cargo +nightly fmt --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- name: cargo clippy
run: cargo clippy --workspace --all-features -- -D warnings
udeps:
name: udeps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: install udeps
run: cargo install --git https://github.com/est31/cargo-udeps --locked
- name: cargo udeps
run: cargo +nightly udeps
18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
override: true
- name: test
run: cargo test --workspace --all-features
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
Cargo.lock
/target
13 changes: 13 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Rustfmt configuration

imports_granularity = "Crate"
group_imports = "StdExternalCrate"

format_code_in_doc_comments = true

use_field_init_shorthand = true

wrap_comments = true
normalize_comments = true
comment_width = 80
edition = "2021"
303 changes: 303 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bdf0e72

Please sign in to comment.