Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
version: 2
registries:
pkg-kiwitcms-eu:
type: python-index
replaces-base: false
url: https://pkg.kiwitcms.eu/pypi/
token: ${{ secrets.GEMFURY_PULL_TOKEN }}

updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "03:00"
open-pull-requests-limit: 10
- package-ecosystem: pip
registries: "*"
insecure-external-code-execution: allow
directory: "/"
schedule:
interval: daily
time: "03:00"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
time: "04:00"
open-pull-requests-limit: 5
32 changes: 32 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: publish-package

on:
push:
tags:
- v*

permissions: read-all

jobs:
publish-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]

steps:
- uses: actions/checkout@v6

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

- name: Build and push
env:
TWINE_USERNAME: ${{ secrets.GEMFURY_USERNAME }}
TWINE_PASSWORD: ${{ secrets.GEMFURY_PUSH_TOKEN }}
run: |
pip install -U pip "setuptools<82" twine wheel

make upload
33 changes: 32 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ on:
branches: master
pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions: read-all

jobs:
build-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]

steps:
- uses: actions/checkout@v6

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

- name: Build me
run: |
pip install -U pip "setuptools<82" wheel twine

make package

postgres:
env:
Expand Down Expand Up @@ -36,16 +61,22 @@ jobs:
echo "password = ${{ secrets.TCMS_PASSWORD }}" >> ~/.tcms.conf

- name: Install dependencies
env:
PKG_TOKEN: ${{ secrets.GEMFURY_PULL_TOKEN }}
run: |
sudo apt-get install libkrb5-dev

pip install -r devel.txt
pip install -r devel.txt \
--index-url https://$PKG_TOKEN@pkg.kiwitcms.eu/pypi/ \
--extra-index-url https://pypi.org/simple/

pip install $(curl --silent https://raw.githubusercontent.com/kiwitcms/Kiwi/master/requirements/base.txt | grep PyGithub)

- name: Execute tests
env:
KIWI_GITHUB_APP_ID: ${{ secrets.KIWI_GITHUB_APP_ID }}
KIWI_GITHUB_APP_PRIVATE_KEY: ${{ secrets.KIWI_GITHUB_APP_PRIVATE_KEY }}
PKG_TOKEN: ${{ secrets.GEMFURY_PULL_TOKEN }}
run: |
# report to Kiwi TCMS only if we have access to secrets
if [ -n "${{ secrets.TCMS_PASSWORD }}" ]; then
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2023 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2019-2026 Alexander Todorov <atodorov@otb.bg>
#
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html
Expand All @@ -11,7 +11,7 @@ test:
if [ ! -d "$(KIWI_INCLUDE_PATH)/kiwi_lint" ]; then \
git clone --depth 1 https://github.com/kiwitcms/Kiwi.git $(KIWI_INCLUDE_PATH); \
pip install -U -r $(KIWI_INCLUDE_PATH)/requirements/base.txt; \
pip install -U -r requirements.txt; \
pip install -U -r requirements.txt --index-url https://$(PKG_TOKEN)@pkg.kiwitcms.eu/pypi/ --extra-index-url https://pypi.org/simple/; \
rm -rf $(PATH_TO_SITE_PACKAGES)/test_project; \
fi

Expand All @@ -32,7 +32,7 @@ pylint:
if [ ! -d "$(KIWI_INCLUDE_PATH)/kiwi_lint" ]; then \
git clone --depth 1 https://github.com/kiwitcms/Kiwi.git $(KIWI_INCLUDE_PATH); \
pip install -U -r $(KIWI_INCLUDE_PATH)/requirements/base.txt; \
pip install -U -r requirements.txt; \
pip install -U -r requirements.txt; --index-url https://$(PKG_TOKEN)@pkg.kiwitcms.eu/pypi/ --extra-index-url https://pypi.org/simple/; \
rm -rf $(PATH_TO_SITE_PACKAGES)/test_project; \
fi

Expand All @@ -46,7 +46,7 @@ test_for_missing_migrations:
if [ ! -d "$(KIWI_INCLUDE_PATH)/kiwi_lint" ]; then \
git clone --depth 1 https://github.com/kiwitcms/Kiwi.git $(KIWI_INCLUDE_PATH); \
pip install -U -r $(KIWI_INCLUDE_PATH)/requirements/base.txt; \
pip install -U -r requirements.txt; \
pip install -U -r requirements.txt; --index-url https://$(PKG_TOKEN)@pkg.kiwitcms.eu/pypi/ --extra-index-url https://pypi.org/simple/; \
rm -rf $(PATH_TO_SITE_PACKAGES)/test_project; \
fi

Expand All @@ -61,3 +61,17 @@ check: flake8 pylint test_for_missing_migrations test
messages:
./manage.py makemessages --locale en --no-obsolete --no-vinaigrette --ignore "test*.py"
ls tcms_github_app/locale/*/LC_MESSAGES/*.po | xargs -n 1 -I @ msgattrib -o @ --no-fuzzy @


.PHONY: package
package:
rm -rf build/ dist/ kiwitcms_*.egg-info/
python setup.py sdist
python setup.py bdist_wheel
twine check dist/*

.PHONY: upload
upload: package
test -n "$(TWINE_USERNAME)" || exit 1
test -n "$(TWINE_PASSWORD)" || exit 2
twine upload dist/* --repository-url https://push.fury.io/kiwitcms
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
container_name: postgresql_database
image: postgres:latest
volumes:
- postgresql_database_data:/var/lib/postgresql/data
- postgresql_database_data:/var/lib/postgresql
restart: always
ports:
- 5432:5432
Expand Down
Loading