From bbd6a1d743e03d4548aaa9c0c5748d8fdf706bdb Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 19 Sep 2022 13:23:58 -0400 Subject: [PATCH 1/5] Add supported python versions to pyproject.toml --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1a10398..6d7264d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,11 @@ classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] keywords = ["base2048", "base64", "base-encoding", "encoding", "decoding"] From 3e3d39cca0e29edb061d48fe42ccaab5afe6da1a Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 19 Sep 2022 13:25:19 -0400 Subject: [PATCH 2/5] Version bump to 0.1.2 --- Cargo.toml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 60ac708..e07b90a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "base2048" description = "Binary encoding with Base2048 in Rust." -version = "0.1.1" +version = "0.1.2" edition = "2021" exclude = ["/dist"] diff --git a/pyproject.toml b/pyproject.toml index 6d7264d..d247772 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "base2048" description = "Binary encoding with Base2048 in Rust." -version = "0.1.1" +version = "0.1.2" readme = "README.md" requires-python = ">=3.7" license = { text = "MIT" } From cb6b45386fbd30a8277e82febe3746911274a8d5 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 19 Sep 2022 13:50:58 -0400 Subject: [PATCH 3/5] Add python matrix test fuzz CI --- .github/workflows/py-test.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/py-test.yml diff --git a/.github/workflows/py-test.yml b/.github/workflows/py-test.yml new file mode 100644 index 0000000..0d2ece9 --- /dev/null +++ b/.github/workflows/py-test.yml @@ -0,0 +1,44 @@ +name: Python Tests + +on: + push: + branches: + - main + pull_request: + workflow_call: + workflow_dispatch: + +jobs: + build: + name: Build and Test + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.11"] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Package + run: | + python -m pip install .[dev] + + - name: Build + run: | + maturin build --release + python -m pip install . + + - name: Test + run: | + python -m pytest tests + + - name: Fuzz + run: | + cd tests + python -m fuzz From cfc39d7f02b6d9957dbf5f863a1aa1dc54f5abee Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 19 Sep 2022 14:08:07 -0400 Subject: [PATCH 4/5] Moved fuzz out of extended matrix --- .github/workflows/py-test.yml | 7 +------ pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/py-test.yml b/.github/workflows/py-test.yml index 0d2ece9..b93682c 100644 --- a/.github/workflows/py-test.yml +++ b/.github/workflows/py-test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.11"] + python-version: ["3.7", "3.11.0-rc.2"] os: [ubuntu-latest, windows-latest, macos-latest] steps: @@ -37,8 +37,3 @@ jobs: - name: Test run: | python -m pytest tests - - - name: Fuzz - run: | - cd tests - python -m fuzz diff --git a/pyproject.toml b/pyproject.toml index d247772..02237e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,8 @@ dev = [ "maturin", "pytest", "pytest-cov", +] +fuzz = [ "frelatage", ] From cfe89adbbd46290374634ab7a632ff1f9fefe461 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 19 Sep 2022 14:13:18 -0400 Subject: [PATCH 5/5] Add python tests badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 55833cf..b9c4751 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ [![build_badge]][build_url] [![Rust Tests](https://github.com/ionite34/base2048/actions/workflows/rust-test.yml/badge.svg)](https://github.com/ionite34/base2048/actions/workflows/rust-test.yml) +[![Python Tests](https://github.com/ionite34/base2048/actions/workflows/py-test.yml/badge.svg)](https://github.com/ionite34/base2048/actions/workflows/py-test.yml) + [![codecov](https://codecov.io/gh/ionite34/base2048/branch/main/graph/badge.svg?token=1Qdx8w3zoy)](https://codecov.io/gh/ionite34/base2048) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ionite34/base2048/main.svg)](https://results.pre-commit.ci/latest/github/ionite34/base2048/main)