Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport version-15] refactor: pyproject.toml to poetry #38

Draft
wants to merge 1 commit into
base: version-15
Choose a base branch
from
Draft
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
26 changes: 26 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- uses: tibdex/backport@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 12 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install JS Dependencies
run: yarn --prefer-offline

Expand All @@ -81,4 +84,12 @@ jobs:
working-directory: /home/runner/frappe-bench
run: |
source env/bin/activate
pytest ./apps/electronic_payments/electronic_payments/tests/ --disable-warnings -s
cd apps/electronic_payments
poetry install
pytest --cov=electronic_payments --cov-report=xml --disable-warnings -s | tee pytest-coverage.txt

- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: /home/runner/frappe-bench/apps/electronic_payments/pytest-coverage.txt
pytest-xml-coverage-path: /home/runner/frappe-bench/apps/electronic_payments/coverage.xml
26 changes: 15 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
rev: v4.3.0
hooks:
- id: trailing-whitespace
files: 'frappe.*'
files: 'electronic_payments.*'
exclude: '.*json$|.*txt$|.*csv|.*md|.*svg'
- id: check-yaml
- id: no-commit-to-branch
Expand Down Expand Up @@ -38,12 +38,12 @@ repos:
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
frappe/public/dist/.*|
electronic_payments/public/dist/.*|
.*node_modules.*|
.*boilerplate.*|
frappe/www/website_script.js|
frappe/templates/includes/.*|
frappe/public/js/lib/.*
electronic_payments/www/website_script.js|
electronic_payments/templates/includes/.*|
electronic_payments/public/js/lib/.*
)$

- repo: https://github.com/PyCQA/flake8
Expand All @@ -52,14 +52,18 @@ repos:
- id: flake8
additional_dependencies: ['flake8-bugbear']

- repo: local
- repo: https://github.com/agritheory/test_utils
rev: v0.14.1
hooks:
- id: update_pre_commit_config
- id: validate_copyright
files: '\.(js|ts|py|md)$'
args: ["--app", "electronic_payments"]
- id: clean_customized_doctypes
args: ["--app", "electronic_payments"]
- id: validate_customizations
always_run: true
name: .github/validate_customizations.py
entry: python .github/validate_customizations.py
language: system
types: [python]
- id: validate_python_dependencies
- id: validate_javascript_dependencies

ci:
autoupdate_schedule: weekly
Expand Down
Loading