Skip to content

Commit

Permalink
ci: update workflow deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Jan 16, 2024
1 parent 5b9339b commit b9c96e0
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ charset = utf-8
indent_style = tab
indent_size = 2
max_line_length = 99

# JSON files - mostly doctype schema files
[{*.json}]
insert_final_newline = false
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cloud_storage/public/js/lib/*
cloud_storage/templates/includes/*
cloud_storage/www/website_script.js
124 changes: 124 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"env": {
"browser": true,
"node": true,
"es2022": true
},
"parserOptions": {
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
"indent": "off",
"brace-style": "off",
"no-mixed-spaces-and-tabs": "off",
"no-useless-escape": "off",
"space-unary-ops": ["error", { "words": true }],
"linebreak-style": "off",
"quotes": ["off"],
"semi": "off",
"camelcase": "off",
"no-unused-vars": "off",
"no-console": ["warn"],
"no-extra-boolean-cast": ["off"],
"no-control-regex": ["off"]
},
"root": true,
"globals": {
"frappe": true,
"Vue": true,
"SetVueGlobals": true,
"__": true,
"repl": true,
"Class": true,
"locals": true,
"cint": true,
"cstr": true,
"cur_frm": true,
"cur_dialog": true,
"cur_page": true,
"cur_list": true,
"cur_tree": true,
"msg_dialog": true,
"is_null": true,
"in_list": true,
"has_common": true,
"posthog": true,
"has_words": true,
"validate_email": true,
"open_web_template_values_editor": true,
"validate_name": true,
"validate_phone": true,
"validate_url": true,
"get_number_format": true,
"format_number": true,
"format_currency": true,
"comment_when": true,
"open_url_post": true,
"toTitle": true,
"lstrip": true,
"rstrip": true,
"strip": true,
"strip_html": true,
"replace_all": true,
"flt": true,
"precision": true,
"CREATE": true,
"AMEND": true,
"CANCEL": true,
"copy_dict": true,
"get_number_format_info": true,
"strip_number_groups": true,
"print_table": true,
"Layout": true,
"web_form_settings": true,
"$c": true,
"$a": true,
"$i": true,
"$bg": true,
"$y": true,
"$c_obj": true,
"refresh_many": true,
"refresh_field": true,
"toggle_field": true,
"get_field_obj": true,
"get_query_params": true,
"unhide_field": true,
"hide_field": true,
"set_field_options": true,
"getCookie": true,
"getCookies": true,
"get_url_arg": true,
"md5": true,
"$": true,
"jQuery": true,
"moment": true,
"hljs": true,
"Awesomplete": true,
"Sortable": true,
"Showdown": true,
"Taggle": true,
"Gantt": true,
"Slick": true,
"Webcam": true,
"PhotoSwipe": true,
"PhotoSwipeUI_Default": true,
"io": true,
"JsBarcode": true,
"L": true,
"Chart": true,
"DataTable": true,
"Cypress": true,
"cy": true,
"it": true,
"describe": true,
"expect": true,
"context": true,
"before": true,
"beforeEach": true,
"after": true,
"qz": true,
"localforage": true,
"extend_cscript": true
}
}
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ignore =
F841,
E713,
E712,
B028,

max-line-length = 200
exclude=,test_*.py
10 changes: 5 additions & 5 deletions .github/workflows/frappe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

concurrency:
group: develop-cloud_storage-${{ github.event.number }}
group: version-15-cloud_storage-${{ github.event.number }}
cancel-in-progress: true

jobs:
Expand All @@ -31,15 +31,15 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Install
working-directory: /home/runner/frappe-bench
run: |
bench get-app cloud_storage $GITHUB_WORKSPACE
bench get-app cloud_storage $GITHUB_WORKSPACE --resolve-deps
bench setup requirements --dev
bench new-site --db-root-password root --admin-password admin test_site
bench --site test_site install-app cloud_storage
Expand Down
33 changes: 24 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: debug-statements

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
rev: v3.9.0
hooks:
- id: pyupgrade
args: ['--py38-plus']
Expand All @@ -34,26 +34,41 @@ repos:
rev: v2.7.1
hooks:
- id: prettier
types_or: [javascript]
types_or: [javascript, vue, scss]
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
.*boilerplate.*|
.*node_modules.*|
cloud_storage/public/dist/.*|
cloud_storage/public/js/lib/.*|
cloud_storage/templates/includes/.*|
cloud_storage/www/website_script.js
.*node_modules.*|
cloud_storage/public/dist/.*|
cloud_storage/public/js/lib/.*|
cloud_storage/templates/includes/.*|
cloud_storage/www/website_script.js
)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0
hooks:
- id: eslint
types_or: [javascript]
args: ['--quiet']
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
.*node_modules.*|
cloud_storage/public/dist/.*|
cloud_storage/public/js/lib/.*|
cloud_storage/templates/includes/.*|
cloud_storage/www/website_script.js
)$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ['flake8-bugbear',]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
# import frappe
from frappe.model.document import Document


class FileAssociation(Document):
pass
3 changes: 1 addition & 2 deletions cloud_storage/tests/test_file_association.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from io import BytesIO
from pathlib import Path

import frappe
import pytest
from moto import mock_s3

import frappe


@pytest.fixture
def example_file_record_0():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requires-python = ">=3.8"
readme = "README.md"
dynamic = ["version"]
dependencies = [
"boto3~=1.28.10",
"boto3==1.28.10",
"botocore~=1.29.41",
"python-magic~=0.4.27",
"pytest",
Expand Down

0 comments on commit b9c96e0

Please sign in to comment.