Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1 change: 0 additions & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ enabled = true

[analyzers.meta]
runtime_version = "3.x.x"

111 changes: 0 additions & 111 deletions .github/workflows/ci-tests.yml

This file was deleted.

89 changes: 0 additions & 89 deletions .github/workflows/ci.yml

This file was deleted.

45 changes: 24 additions & 21 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,55 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: linters-propms-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
linter:
name: 'Frappe Linter'
semgrep:
name: Frappe Linter
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.11"
cache: pip
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit on changed files
run: |
pre-commit run \
--show-diff-on-failure \
--color=always \
--from-ref origin/${{ github.base_ref }} \
--to-ref HEAD

- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules

- name: Install Semgrep
run: pip install semgrep

# Blocking: real bugs and security issues only
- name: Run Semgrep rules
run: |
pip install semgrep
semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
semgrep scan --config ./frappe-semgrep-rules/rules \
--config r/python.lang.security \
--severity=ERROR --error propms

# Informational: style and i18n warnings, never fails the build
- name: Semgrep warnings (non-blocking)
if: always()
run: |
semgrep scan --config ./frappe-semgrep-rules/rules \
--config r/python.lang.security \
--severity=WARNING propms || true

deps-vulnerable-check:
name: 'Vulnerable Dependency Check'
name: Vulnerable Dependency Check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- uses: actions/checkout@v4
python-version: "3.11"

- name: Cache pip
uses: actions/cache@v4
Expand All @@ -66,5 +70,4 @@ jobs:
- name: Install and run pip-audit
run: |
pip install pip-audit
cd ${GITHUB_WORKSPACE}
pip-audit --desc on .
31 changes: 31 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pre-commit

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: precommit-propms-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip

- uses: actions/setup-node@v4
with:
node-version: 20

- uses: pre-commit/action@v3.0.1
43 changes: 0 additions & 43 deletions .github/workflows/release.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/semantic-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Semantic Commits

on:
pull_request: {}

permissions:
contents: read

concurrency:
group: commitcheck-propms-${{ github.event.number }}
cancel-in-progress: true

jobs:
commitlint:
name: Check Commit Messages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 200

- uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true

- name: Check commit messages
run: |
npm install @commitlint/cli @commitlint/config-conventional conventional-changelog-conventionalcommits
npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
Loading
Loading