Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/angular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Angular Vitest CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

defaults:
run:
working-directory: frontend

steps:
- name: Checkout Code
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-on-version: '24'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install Dependencies
run: npm ci --force

- name: Run Vitest Tests
run: npm run test -- --watch=false
env:
CI: true
62 changes: 0 additions & 62 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/python-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: "PythonAnalysis"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.14"]

steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pylint pytest mysqlclient
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 --ignore E303,E501,W503
- name: Test with unittest
run: |
touch config.py
python3 -m unittest api_test.py
6 changes: 3 additions & 3 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))

from permissions.storeConfig import storeConfig
from permissions.checkPrivilege import checkPrivilege
from permissions.sendHistory import sendHistory
from permissions.storeConfig import storeConfig # noqa: E402
from permissions.checkPrivilege import checkPrivilege # noqa: E402
from permissions.sendHistory import sendHistory # noqa: E402


# dispatch call: can be
Expand Down
2 changes: 1 addition & 1 deletion hooks/verifymsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def read_commandline_arguments(self):

try:
opts, args = getopt.getopt(sys.argv[1:], "", ["url=", "repository=", "msgfile="])
except:
except Exception:
print("Command line: --repository=name --url=https://example.com/postsai/extensions/commitstop/api.py --msgfile=%l")
sys.exit(2)

Expand Down
4 changes: 2 additions & 2 deletions permissions/checkPrivilege.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))

try:
from permissions.configDb import fetchLatestConfig
from permissions.configDb import fetchLatestConfig # noqa: E40
except ImportError:
pass

from permissions.response import ret403, ret200
from permissions.response import ret403, ret200 # noqa: E40


def matchesPattern(name, pattern):
Expand Down
8 changes: 4 additions & 4 deletions permissions/storeConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))

import config
import config # noqa: E40

from permissions.configDb import writeConfigToDB
from permissions.checkPrivilege import checkLinesSyntax
from permissions.response import ret403
from permissions.configDb import writeConfigToDB # noqa: E40
from permissions.checkPrivilege import checkLinesSyntax # noqa: E40
from permissions.response import ret403 # noqa: E40


def storeConfig(arguments):
Expand Down
Loading