hypern 0.1.0__tar.gz → 0.3.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hypern-0.1.0 → hypern-0.3.10}/.github/workflows/codeql.yml +2 -0
- {hypern-0.1.0 → hypern-0.3.10}/.github/workflows/codspeed.yml +3 -3
- {hypern-0.1.0 → hypern-0.3.10}/.github/workflows/preview-deployments.yml +48 -1
- hypern-0.3.10/.github/workflows/release-CI.yml +168 -0
- {hypern-0.1.0 → hypern-0.3.10}/.github/workflows/security-scan.yml +3 -20
- hypern-0.3.10/Cargo.lock +3068 -0
- hypern-0.3.10/Cargo.toml +49 -0
- hypern-0.3.10/PKG-INFO +134 -0
- hypern-0.3.10/README.md +106 -0
- {hypern-0.1.0 → hypern-0.3.10}/benchmark.sh +2 -2
- hypern-0.3.10/docs/background.md +96 -0
- hypern-0.3.10/docs/cache.md +111 -0
- hypern-0.3.10/docs/database.md +231 -0
- hypern-0.3.10/docs/index.md +145 -0
- hypern-0.3.10/docs/response.md +101 -0
- hypern-0.3.10/docs/schedule.md +118 -0
- hypern-0.3.10/docs/websocket.md +283 -0
- hypern-0.3.10/hypern/__init__.py +24 -0
- hypern-0.3.10/hypern/application.py +495 -0
- hypern-0.3.10/hypern/args_parser.py +73 -0
- hypern-0.3.10/hypern/caching/__init__.py +6 -0
- hypern-0.3.10/hypern/caching/backend.py +31 -0
- hypern-0.3.10/hypern/caching/redis_backend.py +201 -0
- hypern-0.3.10/hypern/caching/strategies.py +208 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/config.py +97 -0
- hypern-0.3.10/hypern/database/sqlalchemy/__init__.py +4 -0
- hypern-0.3.10/hypern/database/sqlalchemy/config.py +66 -0
- {hypern-0.1.0/hypern/db/sql → hypern-0.3.10/hypern/database/sqlalchemy}/repository.py +4 -3
- hypern-0.3.10/hypern/database/sqlx/__init__.py +36 -0
- hypern-0.3.10/hypern/database/sqlx/field.py +246 -0
- hypern-0.3.10/hypern/database/sqlx/migrate.py +263 -0
- hypern-0.3.10/hypern/database/sqlx/model.py +117 -0
- hypern-0.3.10/hypern/database/sqlx/query.py +904 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/datastructures.py +15 -2
- hypern-0.3.10/hypern/exceptions/__init__.py +34 -0
- hypern-0.3.10/hypern/exceptions/base.py +62 -0
- hypern-0.3.10/hypern/exceptions/common.py +12 -0
- hypern-0.3.10/hypern/exceptions/errors.py +15 -0
- hypern-0.3.10/hypern/exceptions/formatters.py +56 -0
- hypern-0.3.10/hypern/exceptions/http.py +76 -0
- hypern-0.3.10/hypern/gateway/__init__.py +6 -0
- hypern-0.3.10/hypern/gateway/aggregator.py +32 -0
- hypern-0.3.10/hypern/gateway/gateway.py +41 -0
- hypern-0.3.10/hypern/gateway/proxy.py +60 -0
- hypern-0.3.10/hypern/gateway/service.py +52 -0
- hypern-0.3.10/hypern/hypern.pyi +333 -0
- hypern-0.3.10/hypern/logging/__init__.py +3 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/logging/logger.py +13 -22
- hypern-0.3.10/hypern/middleware/__init__.py +17 -0
- hypern-0.3.10/hypern/middleware/base.py +13 -0
- hypern-0.3.10/hypern/middleware/cache.py +177 -0
- hypern-0.3.10/hypern/middleware/compress.py +78 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/middleware/cors.py +6 -3
- {hypern-0.1.0 → hypern-0.3.10}/hypern/middleware/limit.py +10 -7
- hypern-0.3.10/hypern/middleware/security.py +184 -0
- hypern-0.3.10/hypern/openapi/schemas.py +51 -0
- hypern-0.3.10/hypern/processpool.py +139 -0
- hypern-0.3.10/hypern/reload.py +46 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/response/response.py +11 -3
- hypern-0.3.10/hypern/routing/__init__.py +5 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/routing/dispatcher.py +18 -13
- {hypern-0.1.0 → hypern-0.3.10}/hypern/routing/endpoint.py +7 -4
- {hypern-0.1.0 → hypern-0.3.10}/hypern/routing/parser.py +23 -26
- hypern-0.3.10/hypern/routing/queue.py +175 -0
- hypern-0.1.0/hypern/routing/router.py → hypern-0.3.10/hypern/routing/route.py +72 -71
- hypern-0.3.10/hypern/worker.py +274 -0
- hypern-0.3.10/hypern/ws/__init__.py +4 -0
- hypern-0.3.10/hypern/ws/channel.py +80 -0
- hypern-0.3.10/hypern/ws/heartbeat.py +74 -0
- hypern-0.3.10/hypern/ws/room.py +76 -0
- hypern-0.3.10/hypern/ws/route.py +26 -0
- hypern-0.3.10/poetry.lock +2590 -0
- {hypern-0.1.0 → hypern-0.3.10}/pyproject.toml +22 -19
- {hypern-0.1.0 → hypern-0.3.10}/src/background/background_tasks.rs +1 -1
- hypern-0.3.10/src/database/context.rs +38 -0
- hypern-0.3.10/src/database/mod.rs +2 -0
- hypern-0.3.10/src/database/sql/config.rs +144 -0
- hypern-0.3.10/src/database/sql/connection.rs +101 -0
- hypern-0.3.10/src/database/sql/db_trait.rs +69 -0
- hypern-0.3.10/src/database/sql/mod.rs +7 -0
- hypern-0.3.10/src/database/sql/mysql.rs +232 -0
- hypern-0.3.10/src/database/sql/postgresql.rs +335 -0
- hypern-0.3.10/src/database/sql/sqlite.rs +236 -0
- hypern-0.3.10/src/database/sql/transaction.rs +240 -0
- hypern-0.3.10/src/di.rs +64 -0
- hypern-0.3.10/src/executor.rs +122 -0
- hypern-0.3.10/src/instants.rs +26 -0
- hypern-0.3.10/src/lib.rs +54 -0
- hypern-0.3.10/src/mem_pool.rs +155 -0
- hypern-0.3.10/src/middlewares/base.rs +83 -0
- hypern-0.3.10/src/middlewares/mod.rs +1 -0
- hypern-0.3.10/src/openapi/schemas.rs +69 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/openapi/swagger.rs +1 -14
- hypern-0.3.10/src/router/mod.rs +2 -0
- hypern-0.3.10/src/router/route.rs +112 -0
- hypern-0.3.10/src/router/router.rs +237 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/scheduler/job.rs +0 -9
- {hypern-0.1.0 → hypern-0.3.10}/src/scheduler/scheduler.rs +1 -1
- hypern-0.3.10/src/server.rs +527 -0
- hypern-0.3.10/src/types/body.rs +10 -0
- hypern-0.3.10/src/types/function_info.rs +28 -0
- hypern-0.3.10/src/types/header.rs +115 -0
- hypern-0.3.10/src/types/http.rs +16 -0
- hypern-0.3.10/src/types/middleware.rs +9 -0
- hypern-0.3.10/src/types/mod.rs +9 -0
- hypern-0.3.10/src/types/query.rs +113 -0
- hypern-0.3.10/src/types/request.rs +353 -0
- hypern-0.3.10/src/types/response.rs +147 -0
- hypern-0.3.10/src/types/url.rs +24 -0
- hypern-0.3.10/src/ws/mod.rs +4 -0
- hypern-0.3.10/src/ws/route.rs +86 -0
- hypern-0.3.10/src/ws/router.rs +165 -0
- hypern-0.3.10/src/ws/socket.rs +44 -0
- hypern-0.3.10/src/ws/websocket.rs +248 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/conftest.py +2 -4
- {hypern-0.1.0 → hypern-0.3.10}/tests/server.py +11 -29
- hypern-0.1.0/Cargo.lock +0 -1073
- hypern-0.1.0/Cargo.toml +0 -34
- hypern-0.1.0/PKG-INFO +0 -121
- hypern-0.1.0/README.md +0 -95
- hypern-0.1.0/hypern/__init__.py +0 -4
- hypern-0.1.0/hypern/application.py +0 -234
- hypern-0.1.0/hypern/caching/base/__init__.py +0 -8
- hypern-0.1.0/hypern/caching/base/backend.py +0 -3
- hypern-0.1.0/hypern/caching/base/key_maker.py +0 -8
- hypern-0.1.0/hypern/caching/cache_manager.py +0 -56
- hypern-0.1.0/hypern/caching/cache_tag.py +0 -10
- hypern-0.1.0/hypern/caching/custom_key_maker.py +0 -11
- hypern-0.1.0/hypern/caching/redis_backend.py +0 -3
- hypern-0.1.0/hypern/db/nosql/__init__.py +0 -25
- hypern-0.1.0/hypern/db/nosql/addons/__init__.py +0 -4
- hypern-0.1.0/hypern/db/nosql/addons/color.py +0 -16
- hypern-0.1.0/hypern/db/nosql/addons/daterange.py +0 -30
- hypern-0.1.0/hypern/db/nosql/addons/encrypted.py +0 -53
- hypern-0.1.0/hypern/db/nosql/addons/password.py +0 -134
- hypern-0.1.0/hypern/db/nosql/addons/unicode.py +0 -10
- hypern-0.1.0/hypern/db/sql/__init__.py +0 -176
- hypern-0.1.0/hypern/db/sql/addons/__init__.py +0 -14
- hypern-0.1.0/hypern/db/sql/addons/color.py +0 -15
- hypern-0.1.0/hypern/db/sql/addons/daterange.py +0 -22
- hypern-0.1.0/hypern/db/sql/addons/datetime.py +0 -22
- hypern-0.1.0/hypern/db/sql/addons/encrypted.py +0 -58
- hypern-0.1.0/hypern/db/sql/addons/password.py +0 -170
- hypern-0.1.0/hypern/db/sql/addons/ts_vector.py +0 -46
- hypern-0.1.0/hypern/db/sql/addons/unicode.py +0 -15
- hypern-0.1.0/hypern/exceptions.py +0 -93
- hypern-0.1.0/hypern/hypern.pyi +0 -172
- hypern-0.1.0/hypern/logging/__init__.py +0 -3
- hypern-0.1.0/hypern/middleware/__init__.py +0 -5
- hypern-0.1.0/hypern/middleware/base.py +0 -16
- hypern-0.1.0/hypern/openapi/schemas.py +0 -64
- hypern-0.1.0/hypern/routing/__init__.py +0 -4
- hypern-0.1.0/hypern/security.py +0 -44
- hypern-0.1.0/hypern/worker.py +0 -30
- hypern-0.1.0/poetry.lock +0 -2301
- hypern-0.1.0/src/cache/backend.rs +0 -24
- hypern-0.1.0/src/cache/mod.rs +0 -2
- hypern-0.1.0/src/cache/redis_backend.rs +0 -37
- hypern-0.1.0/src/lib.rs +0 -26
- hypern-0.1.0/src/openapi/schemas.rs +0 -53
- hypern-0.1.0/src/utils.rs +0 -32
- hypern-0.1.0/tests/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/.github/dependabot.yml +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/.gitignore +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/.pre-commit-config.yaml +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/CODE_OF_CONDUCT.md +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/LICENSE +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/SECURITY.md +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/auth/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/auth/authorization.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/background.py +0 -0
- {hypern-0.1.0/hypern/caching → hypern-0.3.10/hypern/cli}/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/cli/commands.py +0 -0
- {hypern-0.1.0/hypern/cli → hypern-0.3.10/hypern/database}/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/enum.py +0 -0
- {hypern-0.1.0/hypern/db → hypern-0.3.10/hypern/i18n}/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/middleware/i18n.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/openapi/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/openapi/swagger.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/py.typed +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/response/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/hypern/scheduler.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/scripts/format.sh +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/sonar-project.properties +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/background/background_task.rs +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/background/mod.rs +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/openapi/mod.rs +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/scheduler/mod.rs +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/src/scheduler/retry.rs +0 -0
- {hypern-0.1.0/hypern/i18n → hypern-0.3.10/tests}/__init__.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/test_functional_handler.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/test_request_file.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/test_response_type.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/test_sync_async.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/test_validate_field.py +0 -0
- {hypern-0.1.0 → hypern-0.3.10}/tests/utils.py +0 -0
@@ -34,9 +34,9 @@ jobs:
|
|
34
34
|
run: |
|
35
35
|
python -m pip install --upgrade pip
|
36
36
|
pip install poetry maturin
|
37
|
-
poetry
|
38
|
-
|
39
|
-
|
37
|
+
poetry config virtualenvs.create false
|
38
|
+
poetry lock
|
39
|
+
poetry install
|
40
40
|
- name: Setup Rust part of the project
|
41
41
|
run: |
|
42
42
|
maturin build -i python${{ matrix.python-version }} --release --out dist
|
@@ -12,10 +12,11 @@ on:
|
|
12
12
|
branches:
|
13
13
|
- stag
|
14
14
|
- main
|
15
|
+
workflow_dispatch:
|
15
16
|
|
16
17
|
jobs:
|
17
18
|
macos:
|
18
|
-
runs-on: macos-
|
19
|
+
runs-on: macos-13
|
19
20
|
strategy:
|
20
21
|
matrix:
|
21
22
|
python-version: ["3.10", "3.11", "3.12"]
|
@@ -92,3 +93,49 @@ jobs:
|
|
92
93
|
run: |
|
93
94
|
pip install --force-reinstall dist/*.whl
|
94
95
|
cd ~ && python -c 'import hypern'
|
96
|
+
|
97
|
+
linux-cross:
|
98
|
+
runs-on: ubuntu-latest
|
99
|
+
strategy:
|
100
|
+
fail-fast: false
|
101
|
+
matrix:
|
102
|
+
python:
|
103
|
+
[
|
104
|
+
{ version: "3.10", abi: "cp310-cp310" },
|
105
|
+
{ version: "3.11", abi: "cp311-cp311" },
|
106
|
+
{ version: "3.12", abi: "cp312-cp312" },
|
107
|
+
]
|
108
|
+
target: [aarch64, armv7]
|
109
|
+
steps:
|
110
|
+
- uses: actions/checkout@v3
|
111
|
+
- name: Build Wheels
|
112
|
+
uses: PyO3/maturin-action@v1
|
113
|
+
env:
|
114
|
+
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib
|
115
|
+
with:
|
116
|
+
target: ${{ matrix.target }}
|
117
|
+
manylinux: auto
|
118
|
+
args: -i python${{matrix.python.version}} --release --out dist
|
119
|
+
- uses: uraimo/run-on-arch-action@v2
|
120
|
+
name: Install build wheel
|
121
|
+
with:
|
122
|
+
arch: ${{ matrix.target }}
|
123
|
+
distro: ubuntu20.04
|
124
|
+
githubToken: ${{ github.token }}
|
125
|
+
dockerRunArgs: |
|
126
|
+
--volume "${PWD}/dist:/artifacts"
|
127
|
+
install: |
|
128
|
+
apt update -y
|
129
|
+
apt install -y --no-install-recommends software-properties-common
|
130
|
+
add-apt-repository ppa:deadsnakes/ppa
|
131
|
+
apt update -y
|
132
|
+
apt install -y gcc g++ musl-dev python${{ matrix.python.version }}-dev python${{ matrix.python.version }} python${{ matrix.python.version }}-venv
|
133
|
+
run: |
|
134
|
+
ls -lrth /artifacts
|
135
|
+
PYTHON=python${{ matrix.python.version }}
|
136
|
+
$PYTHON --version
|
137
|
+
$PYTHON -m venv venv
|
138
|
+
source venv/bin/activate
|
139
|
+
pip install --upgrade pip setuptools wheel
|
140
|
+
pip install --force-reinstall dist/hypern*.whl
|
141
|
+
cd ~ && python -c 'import hypern'
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# CI to release the project for Linux, Windows, and MacOS
|
2
|
+
name: Release CI
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
workflow_dispatch:
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
macos:
|
11
|
+
runs-on: macos-13
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
python-version: ["3.10", "3.11", "3.12"]
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- uses: actions/setup-python@v5
|
18
|
+
with:
|
19
|
+
python-version: ${{ matrix.python-version }}
|
20
|
+
- uses: dtolnay/rust-toolchain@stable
|
21
|
+
with:
|
22
|
+
targets: aarch64-apple-darwin
|
23
|
+
- name: Build wheels - x86_64
|
24
|
+
uses: PyO3/maturin-action@v1
|
25
|
+
with:
|
26
|
+
target: x86_64
|
27
|
+
args: -i python --release --sdist --out dist
|
28
|
+
- name: Install build wheel - x86_64
|
29
|
+
run: |
|
30
|
+
pip install --force-reinstall dist/*.whl
|
31
|
+
cd ~ && python -c 'import hypern'
|
32
|
+
- name: Build wheels - universal2
|
33
|
+
uses: PyO3/maturin-action@v1
|
34
|
+
with:
|
35
|
+
args: -i python --release --sdist --target universal2-apple-darwin --out dist
|
36
|
+
- name: Install build wheel - universal2
|
37
|
+
run: |
|
38
|
+
pip install --force-reinstall dist/*_universal2.whl
|
39
|
+
cd ~ && python -c 'import hypern'
|
40
|
+
- name: Upload wheels
|
41
|
+
uses: actions/upload-artifact@v3
|
42
|
+
with:
|
43
|
+
name: wheels
|
44
|
+
path: dist
|
45
|
+
windows:
|
46
|
+
runs-on: windows-latest
|
47
|
+
strategy:
|
48
|
+
matrix:
|
49
|
+
python-version: ["3.10", "3.11", "3.12"]
|
50
|
+
target: [x64, x86]
|
51
|
+
steps:
|
52
|
+
- uses: actions/checkout@v4
|
53
|
+
- uses: actions/setup-python@v5
|
54
|
+
with:
|
55
|
+
python-version: ${{ matrix.python-version }}
|
56
|
+
architecture: ${{ matrix.target }}
|
57
|
+
- uses: dtolnay/rust-toolchain@stable
|
58
|
+
- name: Build wheels
|
59
|
+
uses: PyO3/maturin-action@v1
|
60
|
+
with:
|
61
|
+
target: ${{ matrix.target }}
|
62
|
+
args: -i python --release --sdist --out dist
|
63
|
+
- name: Install build wheel
|
64
|
+
shell: bash
|
65
|
+
run: |
|
66
|
+
pip install --force-reinstall dist/*.whl
|
67
|
+
cd ~ && python -c 'import hypern'
|
68
|
+
- name: Upload wheels
|
69
|
+
uses: actions/upload-artifact@v3
|
70
|
+
with:
|
71
|
+
name: wheels
|
72
|
+
path: dist
|
73
|
+
linux:
|
74
|
+
runs-on: ubuntu-latest
|
75
|
+
strategy:
|
76
|
+
matrix:
|
77
|
+
python-version: ["3.10", "3.11", "3.12"]
|
78
|
+
target: [x86_64, i686]
|
79
|
+
steps:
|
80
|
+
- uses: actions/checkout@v4
|
81
|
+
- uses: dtolnay/rust-toolchain@stable
|
82
|
+
- uses: actions/setup-python@v5
|
83
|
+
with:
|
84
|
+
python-version: ${{ matrix.python-version }}
|
85
|
+
- name: Build Wheels
|
86
|
+
uses: PyO3/maturin-action@v1
|
87
|
+
with:
|
88
|
+
target: ${{ matrix.target }}
|
89
|
+
manylinux: auto
|
90
|
+
args: -i python${{ matrix.python-version }} --release --sdist --out dist
|
91
|
+
- name: Install build wheel
|
92
|
+
if: matrix.target == 'x86_64'
|
93
|
+
run: |
|
94
|
+
pip install --force-reinstall dist/*.whl
|
95
|
+
cd ~ && python -c 'import hypern'
|
96
|
+
- name: Upload wheels
|
97
|
+
uses: actions/upload-artifact@v3
|
98
|
+
with:
|
99
|
+
name: wheels
|
100
|
+
path: dist
|
101
|
+
|
102
|
+
linux-cross:
|
103
|
+
runs-on: ubuntu-latest
|
104
|
+
strategy:
|
105
|
+
matrix:
|
106
|
+
python:
|
107
|
+
[
|
108
|
+
{ version: "3.10", abi: "cp310-cp310" },
|
109
|
+
{ version: "3.11", abi: "cp311-cp311" },
|
110
|
+
{ version: "3.12", abi: "cp312-cp312" },
|
111
|
+
]
|
112
|
+
target: [aarch64, armv7]
|
113
|
+
steps:
|
114
|
+
- uses: actions/checkout@v3
|
115
|
+
- name: Build Wheels
|
116
|
+
uses: PyO3/maturin-action@v1
|
117
|
+
env:
|
118
|
+
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}/lib
|
119
|
+
with:
|
120
|
+
target: ${{ matrix.target }}
|
121
|
+
manylinux: auto
|
122
|
+
args: -i python${{matrix.python.version}} --release --sdist --out dist
|
123
|
+
- uses: uraimo/run-on-arch-action@v2
|
124
|
+
name: Install build wheel
|
125
|
+
with:
|
126
|
+
arch: ${{ matrix.target }}
|
127
|
+
distro: ubuntu22.04
|
128
|
+
githubToken: ${{ github.token }}
|
129
|
+
dockerRunArgs: |
|
130
|
+
--volume "${PWD}/dist:/artifacts"
|
131
|
+
install: |
|
132
|
+
apt update -y
|
133
|
+
apt install -y software-properties-common
|
134
|
+
add-apt-repository -y ppa:deadsnakes/ppa
|
135
|
+
apt update -y
|
136
|
+
apt install -y gcc g++ musl-dev python${{ matrix.python.version }}-dev python${{ matrix.python.version }} python${{ matrix.python.version }}-venv
|
137
|
+
run: |
|
138
|
+
ls -lrth /artifacts
|
139
|
+
python${{ matrix.python.version }} -m venv venv
|
140
|
+
source venv/bin/activate
|
141
|
+
python -m pip install --upgrade pip setuptools wheel
|
142
|
+
python -m pip install --force-reinstall /artifacts/hypern*.whl
|
143
|
+
cd ~ && python -c 'import hypern'
|
144
|
+
- name: Upload wheels
|
145
|
+
uses: actions/upload-artifact@v3
|
146
|
+
with:
|
147
|
+
name: wheels
|
148
|
+
path: dist
|
149
|
+
|
150
|
+
release:
|
151
|
+
name: Release
|
152
|
+
runs-on: ubuntu-latest
|
153
|
+
needs: [macos, windows, linux, linux-cross]
|
154
|
+
steps:
|
155
|
+
- uses: actions/download-artifact@v3
|
156
|
+
with:
|
157
|
+
name: wheels
|
158
|
+
- uses: actions/setup-python@v5
|
159
|
+
with:
|
160
|
+
python-version: 3.x
|
161
|
+
|
162
|
+
- name: Publish to PyPi
|
163
|
+
env:
|
164
|
+
TWINE_USERNAME: __token__
|
165
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
166
|
+
run: |
|
167
|
+
pip install --upgrade twine
|
168
|
+
twine upload --skip-existing *
|
@@ -5,6 +5,7 @@ on:
|
|
5
5
|
branches: [ main, stag ]
|
6
6
|
pull_request:
|
7
7
|
branches: [ main, stag ]
|
8
|
+
workflow_dispatch:
|
8
9
|
|
9
10
|
jobs:
|
10
11
|
security-scan:
|
@@ -19,7 +20,7 @@ jobs:
|
|
19
20
|
- name: Export requirements
|
20
21
|
run: |
|
21
22
|
python -m pip install --upgrade pip
|
22
|
-
pip install poetry
|
23
|
+
pip install poetry poetry-plugin-export
|
23
24
|
poetry export --without-hashes --format=requirements.txt > requirements.txt
|
24
25
|
|
25
26
|
- name: Install dependencies
|
@@ -54,7 +55,7 @@ jobs:
|
|
54
55
|
|
55
56
|
# GitGuardian - Scan for secrets
|
56
57
|
- name: GitGuardian scan
|
57
|
-
uses: GitGuardian/ggshield/actions/secret@v1.
|
58
|
+
uses: GitGuardian/ggshield/actions/secret@v1.34.0
|
58
59
|
with:
|
59
60
|
fetch-depth: 0
|
60
61
|
env:
|
@@ -74,24 +75,6 @@ jobs:
|
|
74
75
|
safety-results.json
|
75
76
|
dependency-check-report.json
|
76
77
|
|
77
|
-
# Send notification on critical issues
|
78
|
-
- name: Notify Security Issues
|
79
|
-
if: failure()
|
80
|
-
uses: actions/github-script@v7
|
81
|
-
with:
|
82
|
-
script: |
|
83
|
-
const issueBody = `Security scan failed in ${process.env.GITHUB_WORKFLOW}
|
84
|
-
See detailed results in the workflow artifacts.`;
|
85
|
-
|
86
|
-
github.rest.issues.create({
|
87
|
-
owner: context.repo.owner,
|
88
|
-
repo: context.repo.repo,
|
89
|
-
title: '🚨 Security Scan Failed',
|
90
|
-
body: issueBody,
|
91
|
-
labels: ['security', 'automated-scan']
|
92
|
-
});
|
93
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
94
|
-
|
95
78
|
dependency-review:
|
96
79
|
runs-on: ubuntu-latest
|
97
80
|
if: github.event_name == 'pull_request'
|