Skip to content

Commit

Permalink
Merge pull request #2 from hexfrost/dev
Browse files Browse the repository at this point in the history
Release 0.0.1
  • Loading branch information
kaziamov authored Mar 20, 2024
2 parents 337f890 + 9f64899 commit 6f69877
Show file tree
Hide file tree
Showing 9 changed files with 574 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Compatibility Check

on:
push:
branches:
- 'staging'

jobs:
compatibility:
runs-on: ubuntu-20.04

strategy:
matrix:
python-version: [ 3.8, 3.9, "3.10", 3.11, 3.12 ]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --no-root
- name: Run compatibility tests
run: poetry run pytest
23 changes: 23 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Coverage

on:
push:
branches: [ "dev" ]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install poetry
poetry install
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: poetry run pytest --cov=simplecrud --cov-report xml
debug: true
17 changes: 17 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: flake8

on:
push:
branches: [ "dev", "staging" ]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: |
pip install poetry
poetry install
poetry run flake8
18 changes: 18 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Release to PYPI

on:
push:
branches:
- main

jobs:
deployment:
runs-on: ubuntu-latest
environment: release
steps:
- name: Build and Publish
uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install poetry
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- run: poetry publish --build
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.idea/
.vscode/

.python-version

# Byte-compiled / optimized / DLL files
*cache*
__pycache__/
*.py[cod]
*$py.class
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build:
poetry build
publish:
poetry publish --dry-run
package-install:
python3 -m pip install --user dist/*.whl --force
lint:
poetry run flake8 simpleapi
447 changes: 447 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "simpleapi"
version = "0.0.1"
description = "Library for simple creating endpoints"
authors = ["Kaziamov <[email protected]>"]
packages = [
{ include = "simpleapi" },
]
readme = "README.md"


[tool.poetry.dependencies]
python = "^3.10"
fastapi = "^0.110.0"

[tool.poetry.group.dev.dependencies]
flake8 = "^7.0.0"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added simpleapi/__init__.py
Empty file.

0 comments on commit 6f69877

Please sign in to comment.