Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
OTheDev committed Apr 7, 2024
0 parents commit 94c4f17
Show file tree
Hide file tree
Showing 17 changed files with 1,709 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Multi-platform Test

on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
shell: bash

- id: versions
name: Print versions
shell: bash
run: |
rustup --version
rustc --version
cargo --version
- name: Build release
run: cargo build --release

- name: Run tests
run: cargo test --release

- name: Test installation
run: |
cargo install --path .
pwdg --version
pwdg -l 16
pwdg -h
50 changes: 50 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Static Analysis

on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'

jobs:
lint-and-audit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Rust Environment
run: |
# Install rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
# Install Clippy and rustfmt
rustup component add clippy rustfmt
# Install cargo-audit
cargo install cargo-audit
- name: Print versions
run: |
rustup --version
rustc --version
cargo --version
cargo clippy --version
cargo fmt --version
cargo audit --version
- name: Run clippy (lint)
run: cargo clippy -- -D warnings

- name: Check Code Formatting with rustfmt
run: cargo fmt -- --check

- name: Security Audit with cargo-audit
run: cargo audit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
289 changes: 289 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 94c4f17

Please sign in to comment.