Skip to content

Enhance README documentation and add CI jobs #10

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

Merged
merged 8 commits into from
Sep 4, 2022
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
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 🔨 Build

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: [stable, beta, nightly]
name: 🔨 Build release
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install latest ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build release
run: cargo build --release

106 changes: 0 additions & 106 deletions .github/workflows/checks.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 📄 Build docs

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
docs:
name: 📄 Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build docs
run: cargo doc --verbose
19 changes: 19 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 👔 Check formatting

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
check_format:
name: 👔 Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Formatting
run: cargo fmt -- --verbose --check --color auto

31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🖋 Check linting

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
check_lint_rust:
name: 🖋 Check linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check linting
run: |
rustup component add clippy
set env RUSTFLAGS="-Dwarnings"
cargo clippy --workspace -- -D warnings
check_lint_markdown:
name: 🖋 Check markdown files
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Markdown Linting Action
uses: avto-dev/markdown-lint@v1.5.0
with:
args: "*.md"
16 changes: 0 additions & 16 deletions .github/workflows/md_checks.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 📦 Package

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
license:
name: 🏫 License check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check license
run: |
cargo install cargo-deny
cargo deny check

cargo_check:
name: 📦 Check package integrity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check package integrity
run: cargo package --verbose

publish_dry_run:
name: 📢 Publish dry-run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish dry run
run: cargo publish --dry-run --verbose
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🧪 Tests

on:
pull_request:
push:
branches: ["main", "develop"]

env:
CARGO_TERM_COLOR: always

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: [stable, beta, nightly]
name: 🧪 Run tests
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install latest ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- uses: actions/checkout@v2
- name: Run tests
run: cargo test --verbose

1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
max_width = 88
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@

# Changelog

All notable changes to this project will be documented in this file.
<!-- All notable changes to this project will be documented in this file.
The format is based on :

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to:
* [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -->

## Unreleased

## [0.0.1] - 2022-09-03

### Added

- Created Baseline Project
* Created Baseline Project
11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[package]
name = "pyver"
description = "Python PEP-440 Version Parsing"
authors = ["Allstreamer <allstreamer.contact@gmail.com>"]
description = "Python PEP-440 Version Parser"
authors = [
"Allstreamer <allstreamer.contact@gmail.com>",
"Jan Bronicki <janbronicki@gmail.com>",
]
license = "MIT"
version = "0.1.0"
keywords = ["versions", "python"]
keywords = ["versions", "python", "parser", "semver", "pep-440"]
readme = "README.md"
edition = "2021"
repository = "https://github.com/Allstreamer/pyver"
Expand All @@ -17,4 +20,4 @@ serde = { version = "1", features = ["derive"] }
regex = { version = "1" }
lazy_static = { version = "1.4.0" }
pomsky-macro = { version = "0.6.0" }
derivative = { version = "2.2.0" }
derivative = { version = "2.2.0" }
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# PyVer (WIP)
# PyVer

[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT)
<!-- markdownlint-disable MD013 -->
[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT) [![🧪 Tests](https://github.com/Allstreamer/pyver/actions/workflows/tests.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/tests.yml) [![🖋 Check linting](https://github.com/Allstreamer/pyver/actions/workflows/lint.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/lint.yml) [![🔨 Build](https://github.com/Allstreamer/pyver/actions/workflows/build.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/build.yml) [![📦 Package](https://github.com/Allstreamer/pyver/actions/workflows/package.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/package.yml) [![📄 Build docs](https://github.com/Allstreamer/pyver/actions/workflows/docs.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/docs.yml) [![👔 Check formatting](https://github.com/Allstreamer/pyver/actions/workflows/format.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/format.yml)
<!-- markdownlint-enable MD013 -->

> **Python PEP-440 Version Parsing**
> **Python PEP-440 Version Parser**

This package allows for parsing Python PEP-440 version numbers and comparisons
between PEP-440 Versions
This package allows for parsing Python [PEP-440](https://peps.python.org/pep-0440/)
version numbers and for comparisons between
[PEP-440](https://peps.python.org/pep-0440/) version numbers.

## Usage

```Toml
[dependencies]
pyver = "0.0.1"
pyver = "0"
```

```Rust
Expand Down
Loading