Skip to content

Commit

Permalink
master: Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lowitea committed Aug 12, 2022
2 parents abedc7f + 56815c5 commit 36b192e
Show file tree
Hide file tree
Showing 19 changed files with 537 additions and 858 deletions.
26 changes: 25 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ celerybeat.pid

# Environments
.env
.gen.env
.venv
env/
venv/
Expand Down Expand Up @@ -118,4 +119,27 @@ dmypy.json
.pytype/

# Cython debug symbols
cython_debug/
cython_debug/

# Git
.git
.gitignore

# GitHub
.github

# Other
docs
.coveragerc
.darglint
.editorconfig
.flake8
.isort.cfg
CHANGELOG.md
**/tests
conftest.py
CONTRIBUTING.md
Makefile
pytest.ini
README.md
.dockerignore
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: build

on:
release:
types: [released]
types: [ released ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Build and push Docker image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.CI_DOCKER_HUB_USER }}
password: ${{ secrets.CI_DOCKER_HUB_TOKEN }}
repository: nextuptechnologies/kesha
tags: ${{ github.event.release.tag_name }}, latest
dockerfile: ./deploy/app/Dockerfile
- name: Build and push Docker image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.CI_DOCKER_HUB_USER }}
password: ${{ secrets.CI_DOCKER_HUB_TOKEN }}
repository: nextuptechnologies/kesha
tags: ${{ github.event.release.tag_name }}, latest
dockerfile: ./deploy/app/Dockerfile
18 changes: 9 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
language: [ 'python' ]

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
30 changes: 15 additions & 15 deletions .github/workflows/gen-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ name: gen-docs

on:
release:
types: [released]
types: [ released ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.4'
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.4'

- name: Build docs
run: mdbook build docs
- name: Build docs
run: mdbook build docs

- name: Publication of documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
publish_branch: gh-docs
force_orphan: true
- name: Publication of documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
publish_branch: gh-docs
force_orphan: true
36 changes: 18 additions & 18 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: Type checking

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7

- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install
- name: Analysing the code with mypy
env:
KESHA_SECRET_KEY: secret
run: |
poetry run mypy kesha --ignore-missing-imports
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install
- name: Analysing the code with mypy
env:
KESHA_SECRET_KEY: secret
run: |
poetry run mypy kesha --ignore-missing-imports
88 changes: 44 additions & 44 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: autotests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
autotests:
runs-on: ubuntu-latest
container: python:3.8
container: python:3.10

services:
postgres:
Expand All @@ -20,59 +20,59 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install poetry
run: |
pip install poetry==1.0.9
- name: Install poetry
run: |
pip install poetry==1.0.9
- name: Set up cache
uses: actions/cache@v1
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Set up cache
uses: actions/cache@v1
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run autotests
env:
KESHA_DB_HOST: postgres
KESHA_SECRET_KEY: secret
run: |
poetry run pytest --cov=./ --cov-report=xml
- name: Run autotests
env:
KESHA_DB_HOST: postgres
KESHA_SECRET_KEY: secret
run: |
poetry run pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CI_CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CI_CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: true

lint-check:
runs-on: ubuntu-latest
container: python:3.8
container: python:3.10

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install poetry
run: |
pip install poetry==1.0.9
- name: Install poetry
run: |
pip install poetry==1.0.9
- name: Set up cache
uses: actions/cache@v1
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Set up cache
uses: actions/cache@v1
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Run lint
run: |
poetry run flake8 --count
- name: Run lint
run: |
poetry run flake8 --count
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Version history
We follow [Semantic Versions](https://semver.org/).

## 2.2.0 - Update dependencies

### Updating dependencies
- bump django from 3.1.14 to 4.1 [#226](https://github.com/NUTtech/Kesha/pull/226)
- bump python from 3.8 to 3.10 [#225](https://github.com/NUTtech/Kesha/pull/225)
- bump mypy from 0.950 to 0.971 [#212](https://github.com/NUTtech/Kesha/pull/212)
- bump django-stubs from 1.9.0 to 1.12.0 [#202](https://github.com/NUTtech/Kesha/pull/202)
- bump ipython from 8.3.0 to 8.4.0 [#192](https://github.com/NUTtech/Kesha/pull/192)
- bump flake8-use-fstring from 1.3 to 1.4 [#217](https://github.com/NUTtech/Kesha/pull/217)
- bump celery from 5.2.6 to 5.2.7 [#191](https://github.com/NUTtech/Kesha/pull/191)
- bump django-simpleui from 2022.4.9 to 2022.7.29 [#216](https://github.com/NUTtech/Kesha/pull/216)
- bump celery-types from 0.12.0 to 0.13.1 [#199](https://github.com/NUTtech/Kesha/pull/199)
- bump requests from 2.27.1 to 2.28.1 [#208](https://github.com/NUTtech/Kesha/pull/208)
- bump django-environ from 0.8.1 to 0.9.0 [#201](https://github.com/NUTtech/Kesha/pull/201)
- bump uvicorn from 0.17.6 to 0.18.2 [#207](https://github.com/NUTtech/Kesha/pull/207)
- bump django-stubs-ext from 0.4.0 to 0.5.0 [#203](https://github.com/NUTtech/Kesha/pull/203)
- bump types-requests from 2.27.25 to 2.28.8 [#222](https://github.com/NUTtech/Kesha/pull/222)
- bump flake8-django from 1.1.2 to 1.1.5 [#223](https://github.com/NUTtech/Kesha/pull/223)

## 2.1.0 - Update dependencies

### Minor changes
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ lint: ## Start project's lint on docker
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
run --rm kesha \
flake8 --count
run \
--rm \
--volume "$$(pwd):/app/src:z" \
kesha flake8 --count

build: ## Build docker image
build: envfile ## Build docker image
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
Expand All @@ -63,7 +65,7 @@ envfile: ## Generate env file with variables with prefix KESHA_
$(shell env | egrep '^KESHA_' > .gen.env && echo '.gen.env has been generated' || touch .gen.env)
$(shell test -f .env && cat .env > .gen.env)

runserver: envfile ## Local startup the app on docker with required services
runserver: envfile ## Local startup the app on docker with required services
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
Expand All @@ -72,7 +74,7 @@ runserver: envfile ## Local startup the app on docker with required services
--project-directory . \
up

runserver-uvicorn: envfile ## Local startup the app on docker with uvicorn
runserver-uvicorn: envfile ## Local startup the app on docker with uvicorn
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ _Web-service for testing http requests and webhooks._

Project info:
[![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/nextuptechnologies/kesha/latest)](https://registry.hub.docker.com/r/nextuptechnologies/kesha)
![Python Version](https://img.shields.io/static/v1?label=python&message=3.8&color=blue)
![Python Version](https://img.shields.io/static/v1?label=python&message=3.10&color=blue)
![License](https://img.shields.io/static/v1?label=license&message=Apache+2&color=blue)

Build:
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.10

# Disables the buffer for instant output of messages to stdout from processes.
ENV PYTHONUNBUFFERED=1
Expand Down
7 changes: 6 additions & 1 deletion deploy/docker-compose.autotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ services:
kesha-tests:
image: nextuptechnologies/kesha:latest
volumes:
- ".:/app/src"
- ".:/app/src:z"
environment:
- KESHA_DB_HOST=kesha-database
command: bash /app/start-autotests.sh
depends_on:
- "kesha-database"
networks:
app:
celery:
2 changes: 1 addition & 1 deletion deploy/docker-compose.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
ports:
- "5432"
volumes:
- "${KESHA_DB_VOLUME:-db-volume}:/var/lib/postgresql/data"
- "${KESHA_DB_VOLUME:-db-volume}:/var/lib/postgresql/data:z"
networks:
app:
celery:
Expand Down
Loading

0 comments on commit 36b192e

Please sign in to comment.