diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e8900e8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ +## Generic requirements in order to contribute: + +* One Pull Request per fix/feature/change/... +* Keep the amount of commits per PR as small as possible: if for any reason, you need to fix your commit after the pull request, please squash the changes in one single commit (or tell us why not) +* Always make sure it is mergeable in the default branch +* Any major changes adding a functionality should be disabled by default in the configuration. + + +#### What does it do? + +If it fixes an existing issue, please use GitHub syntax: `#` + +#### Questions + +- [ ] Does it require a DB change? +- [ ] Are you using it in production? + +#### Release Type: +- [ ] Major +- [ ] Minor +- [X] Patch diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..0a7e58e --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,17 @@ +name: pre-commit +on: + pull_request: + push: + branches: [master] +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - run: | + pip install reorder-python-imports + pip install pyupgrade + pip install black + pip install pip-audit + - uses: pre-commit/action@v2.0.3 diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml new file mode 100644 index 0000000..c6d86a3 --- /dev/null +++ b/.github/workflows/pythonapp.yml @@ -0,0 +1,52 @@ +name: Python application + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: [3.10.9, 3.11.0] + + steps: + - uses: actions/checkout@v1 + + - name: Install libxml2-dev and libxslt-dev + run: sudo apt-get install -y libxml2-dev libxslt-dev + + - name: Setup PostgreSQL + uses: Harmon758/postgresql-action@v1.0.0 + with: + postgresql db: 'pumpkin' + postgresql user: 'pumpkin' + postgresql password: 'password' + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install poetry + poetry install + + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + poetry run flake8 . --count --max-complexity=15 --max-line-length=100 --statistics + + # - name: Test with pytest + # run: | + # poetry run pytest + # env: + # testing: actions + + # - name: Type check with mypy + # run: | + # poetry run mypy . diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c79c6cf --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,16 @@ +# Security Policy + +## Supported Versions + +Last stable version always provides security updates. +There will be no security patches for other releases (tagged or not). + +## Reporting a Vulnerability + +In the case of a security vulnerability report, we ask the reporter +to send it directly to [CIRCL](https://www.circl.lu/contact/), if +possible encrypted with the following GnuPG key: +**CA57 2205 C002 4E06 BA70 BE89 EAAD CFFC 22BD 4CD5**. +We usually fix reported and confirmed security vulnerabilities +in less than 48 hours, followed by a software release containing +the fixes within the following days.