Skip to content

Commit

Permalink
Merge pull request #163 from fossasia/development
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
mariobehling authored Jun 15, 2024
2 parents 47d993b + 71d05d3 commit 150a2cd
Show file tree
Hide file tree
Showing 544 changed files with 3,371 additions and 13,979 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates


version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase
- package-ecosystem: "npm"
directory: "/src/pretix/static/npm_dir"
schedule:
interval: "daily"
33 changes: 33 additions & 0 deletions .github/workflows/docker-pr-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker-pr-deploy
on:
workflow_dispatch:
inputs:
repository:
description: "Repository name with owner. For example, actions/checkout"
ref:
description: "The branch, tag or SHA to checkout."

jobs:
push_to_registry:
name: Push Docker image to Docker hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: eventyay/eventyay-ticket:development
labels: manual
17 changes: 17 additions & 0 deletions .github/workflows/docker-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker PR Build

on:
pull_request:
branches: [development, main]

jobs:
build_docker_image:
name: Build Docker image
runs-on: ubuntu-latest

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

- name: Build Docker image
run: docker build -t eventyay-ticket:${{ github.sha }} .
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker
on:
workflow_dispatch:
push:
branches: [ development, main ]
branches: [ development, master ]
tags: [ "*" ]

jobs:
Expand All @@ -23,7 +23,7 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: eventyay/eventyay-tickets
images: eventyay/eventyay-ticket

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Documentation

on:
push:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'src/pretix/locale/**'
- 'src/pretix/static/**'
- 'src/tests/**'
pull_request:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'src/pretix/locale/**'
- 'src/pretix/static/**'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Strings

on:
push:
branches: [ master ]
branches: [ development, master ]
paths:
- 'doc/**'
- 'src/pretix/locale/**'
pull_request:
branches: [ master ]
branches: [ development, master ]
paths:
- 'doc/**'
- 'src/pretix/locale/**'
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Install system packages
run: sudo apt update && sudo apt install gettext
- name: Install Dependencies
run: pip3 install -Ur src/requirements.txt
run: pip3 install -e ".[dev]"
- name: Compile messages
run: python manage.py compilemessages
working-directory: ./src
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Install system packages
run: sudo apt update && sudo apt install enchant hunspell hunspell-de-de aspell-en aspell-de
- name: Install Dependencies
run: pip3 install -Ur src/requirements/dev.txt
run: pip3 install -e ".[dev]"
- name: Spellcheck translations
run: potypo
working-directory: ./src
8 changes: 4 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Code Style

on:
push:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'src/pretix/locale/**'
- 'src/pretix/static/**'
pull_request:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'src/pretix/locale/**'
- 'src/pretix/static/**'
Expand All @@ -29,7 +29,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: pip3 install -Ur src/requirements/dev.txt
run: pip3 install -e ".[dev]" psycopg2-binary
- name: Run isort
run: isort -c .
working-directory: ./src
Expand All @@ -49,7 +49,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt
run: pip3 install -e ".[dev]" psycopg2-binary
- name: Run flake8
run: flake8 .
working-directory: ./src
16 changes: 6 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Tests

on:
push:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'doc/**'
- 'src/pretix/locale/**'
pull_request:
branches: [ master ]
branches: [ development, master ]
paths-ignore:
- 'doc/**'
- 'src/pretix/locale/**'
Expand All @@ -18,17 +18,13 @@ jobs:
name: Tests
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.8]
database: [sqlite, postgres, mysql]
exclude:
- database: mysql
python-version: 3.7
python-version: 3.8
- database: sqlite
python-version: 3.7
- database: mysql
python-version: 3.6
- database: sqlite
python-version: 3.6
python-version: 3.8
steps:
- uses: actions/checkout@v2
- uses: getong/[email protected]
Expand Down Expand Up @@ -57,7 +53,7 @@ jobs:
- name: Install system dependencies
run: sudo apt update && sudo apt install gettext mysql-client
- name: Install Python dependencies
run: pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt mysqlclient psycopg2-binary
run: pip3 install -e ".[dev]" psycopg2-binary
- name: Run checks
run: python manage.py check
working-directory: ./src
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ local/
.project
.pydevproject
.DS_Store

.python-version

4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tests:
- virtualenv env
- source env/bin/activate
- pip install -U pip wheel setuptools
- XDG_CACHE_HOME=/cache pip3 install -r src/requirements.txt --no-use-pep517 -Ur src/requirements/dev.txt
- XDG_CACHE_HOME=/cache pip3 install -e ".[dev]"
- cd src
- python manage.py check
- make all compress
Expand All @@ -21,7 +21,7 @@ pypi:
- virtualenv env
- source env/bin/activate
- pip install -U pip wheel setuptools check-manifest twine
- XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements.txt -r src/requirements/dev.txt
- XDG_CACHE_HOME=/cache pip3 install -e ".[dev]"
- cd src
- python setup.py sdist
- pip install dist/pretix-*.tar.gz
Expand Down
5 changes: 0 additions & 5 deletions CODE_OF_CONDUCT.md

This file was deleted.

11 changes: 0 additions & 11 deletions CONTRIBUTING.md

This file was deleted.

27 changes: 10 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM python:3.8-bookworm
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
default-libmysqlclient-dev \
gettext \
git \
libffi-dev \
Expand Down Expand Up @@ -37,30 +36,24 @@ RUN apt-get update && \
ENV LC_ALL=C.UTF-8 \
DJANGO_SETTINGS_MODULE=production_settings

# To copy only the requirements files needed to install from PIP
COPY src/requirements /pretix/src/requirements
COPY src/requirements.txt /pretix/src
RUN pip3 install -U \
pip \
setuptools \
wheel && \
cd /pretix/src && \
pip3 install \
-r requirements.txt \
-r requirements/memcached.txt \
-r requirements/mysql.txt \
gunicorn django-extensions ipython && \
rm -rf ~/.cache/pip

COPY deployment/docker/pretix.bash /usr/local/bin/pretix
COPY deployment/docker/supervisord /etc/supervisord
COPY deployment/docker/supervisord.all.conf /etc/supervisord.all.conf
COPY deployment/docker/supervisord.web.conf /etc/supervisord.web.conf
COPY deployment/docker/nginx.conf /etc/nginx/nginx.conf
COPY deployment/docker/production_settings.py /pretix/src/production_settings.py
COPY pyproject.toml /pretix/pyproject.toml
COPY src /pretix/src

RUN cd /pretix/src && pip3 install .
RUN pip3 install -U \
pip \
setuptools \
wheel && \
cd /pretix && \
PRETIX_DOCKER_BUILD=TRUE pip3 install \
-e ".[memcached]" \
gunicorn django-extensions ipython && \
rm -rf ~/.cache/pip

RUN chmod +x /usr/local/bin/pretix && \
rm /etc/nginx/sites-enabled/default && \
Expand Down
30 changes: 30 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include LICENSE
include README.rst
global-include *.proto
recursive-include src/pretix/static *
recursive-include src/pretix/static.dist *
recursive-include src/pretix/locale *
recursive-include src/pretix/helpers/locale *
recursive-include src/pretix/base/templates *
recursive-include src/pretix/control/templates *
recursive-include src/pretix/presale/templates *
recursive-include src/pretix/plugins/banktransfer/templates *
recursive-include src/pretix/plugins/banktransfer/static *
recursive-include src/pretix/plugins/manualpayment/templates *
recursive-include src/pretix/plugins/manualpayment/static *
recursive-include src/pretix/plugins/paypal/templates *
recursive-include src/pretix/plugins/pretixdroid/templates *
recursive-include src/pretix/plugins/pretixdroid/static *
recursive-include src/pretix/plugins/sendmail/templates *
recursive-include src/pretix/plugins/statistics/templates *
recursive-include src/pretix/plugins/statistics/static *
recursive-include src/pretix/plugins/stripe/templates *
recursive-include src/pretix/plugins/stripe/static *
recursive-include src/pretix/plugins/ticketoutputpdf/templates *
recursive-include src/pretix/plugins/ticketoutputpdf/static *
recursive-include src/pretix/plugins/badges/templates *
recursive-include src/pretix/plugins/badges/static *
recursive-include src/pretix/plugins/returnurl/templates *
recursive-include src/pretix/plugins/returnurl/static *
recursive-include src/pretix/plugins/webcheckin/templates *
recursive-include src/pretix/plugins/webcheckin/static *
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

build:
docker buildx build --progress=plain -f Dockerfile --platform=linux/amd64 \
-t eventyay/eventyay-tickets:development .
Loading

0 comments on commit 150a2cd

Please sign in to comment.