Skip to content

Commit fae5bff

Browse files
authored
Merge pull request #1 from tiwilliam/tests
Tests
2 parents b28c92f + 87f3e6f commit fae5bff

File tree

23 files changed

+471
-165
lines changed

23 files changed

+471
-165
lines changed

.coverage

52 KB
Binary file not shown.

.github/workflows/docs.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: docs
22

33
on:
44
push:
5-
branches:
6-
- "main"
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
712

813
permissions:
914
contents: write
@@ -18,4 +23,4 @@ jobs:
1823
python-version-file: ".python-version"
1924
- run: |
2025
pip install .[dev]
21-
mkdocs gh-deploy --force
26+
mike deploy --push --update-aliases ${{ github.ref_name }} latest

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
tests:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version-file: ".python-version"
27+
- name: Create virtualenv
28+
run: python -m venv .venv
29+
- name: Activate virtualenv
30+
run: source .venv/bin/activate
31+
- name: Install dependencies
32+
run: pip install .[dev]
33+
- name: Build crate
34+
run: maturin develop
35+
- name: Run tests
36+
run: pytest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/target
22
/.shadowenv.d
3+
*.so
4+
__pycache__/

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11.4
1+
3.12.0

.vscode/settings.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"[rust]": {
33
"editor.formatOnSave": true
4+
},
5+
"[python]": {
6+
"editor.formatOnSave": true,
7+
"editor.defaultFormatter": "ms-python.black-formatter",
8+
},
9+
"files.insertFinalNewline": true,
10+
"files.exclude": {
11+
"**/*.so": true,
12+
"**/.git": true,
13+
"**/.svn": true,
14+
"**/.hg": true,
15+
"**/CVS": true,
16+
"**/.DS_Store": true,
17+
"**/Thumbs.db": true,
18+
"**/__pycache__": true,
19+
"target": true,
20+
"**/.pytest_cache": true,
21+
".coverage": true,
422
}
5-
}
23+
}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rsmime"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
edition = "2021"
55

66
[lib]

Devfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@ name: rsmime
22
version: 1
33

44
up:
5-
- python: 3.11.4
5+
- python: 3.12.0
66
- run: pip install .[dev]
7-
- run: pip uninstall -y rsmime
87

98
commands:
109
build:
1110
description: Build the package
1211
tasks:
1312
- run: maturin build --release --strip
1413

15-
docs:
16-
description: Build new documentation HTML to site directory
14+
develop:
15+
description: Develop the package
16+
tasks:
17+
- run: maturin develop --release --strip
18+
19+
test:
20+
description: Run tests
1721
tasks:
18-
- run: mkdocs build
22+
- run: maturin develop --release --strip
23+
- run: pytest -vv
1924

20-
docs:serve:
25+
docs:
2126
description: Serve and watch documentation for development
2227
tasks:
2328
- run: mkdocs serve

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![PyPI](https://img.shields.io/pypi/v/rsmime?color=gr)](https://pypi.org/project/rsmime/) [![Tests](https://github.com/tiwilliam/rsmime/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/tiwilliam/rsmime/actions/workflows/tests.yml)
44

5-
Rust powered Python package for signing data in S/MIME format
5+
Python package for signing and verifying S/MIME messages
66

77
[Documentation](https://tiwilliam.github.io/rsmime/)
88

0 commit comments

Comments
 (0)