-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #518 from Abdur-rahmaanJ/test/init
Test/init
- Loading branch information
Showing
24 changed files
with
550 additions
and
935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
|
||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- 'shopyo/sphinx_src/**' | ||
- '*.md' | ||
- '*.rst' | ||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# - {name: Windows, python: '3.9', os: windows-latest, tox: py39} | ||
# - {name: Mac, python: '3.9', os: macos-latest, tox: py39} | ||
- {name: Linux, python: '3.9', os: ubuntu-latest, tox: py39} | ||
# - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} | ||
# - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: update pip | ||
run: | | ||
pip install -U wheel | ||
pip install -U setuptools | ||
python -m pip install -U pip | ||
- name: install requirements | ||
run: | | ||
python -m pip install pytest pytest-coverage coverage | ||
python -m pip install . | ||
- name: get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
- name: cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}|${{ hashFiles('requirements.txt') }} | ||
- run: pip install tox codecov | ||
- run: tox -e py | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,9 @@ class Config: | |
|
||
UPLOADED_PRODUCTPHOTOS_DEST = os.path.join(STATIC, "uploads", "products") | ||
UPLOADED_CATEGORYPHOTOS_DEST = os.path.join(STATIC, "uploads", "category") | ||
UPLOADED_SUBCATEGORYPHOTOS_DEST = os.path.join(STATIC, "uploads", "subcategory") | ||
UPLOADED_SUBCATEGORYPHOTOS_DEST = os.path.join( | ||
STATIC, "uploads", "subcategory" | ||
) | ||
UPLOADED_PRODUCTEXCEL_DEST = os.path.join(STATIC, "uploads") | ||
UPLOADED_PRODUCTEXCEL_ALLOW = ("xls", "xlsx", "xlsm", "xlsb", "odf") | ||
PASSWORD_SALT = "abcdefghi" | ||
|
@@ -36,7 +38,7 @@ class DevelopmentConfig(Config): | |
ENV = "development" | ||
DEBUG = True | ||
# EXPLAIN_TEMPLATE_LOADING = True | ||
LOGIN_DISABLED = True | ||
# LOGIN_DISABLED = True | ||
# control email confirmation for user registration | ||
EMAIL_CONFIRMATION_DISABLED = False | ||
# flask-mailman configs | ||
|
@@ -46,7 +48,9 @@ class DevelopmentConfig(Config): | |
MAIL_USE_SSL = False | ||
MAIL_USERNAME = "" # os.environ.get("MAIL_USERNAME") | ||
MAIL_PASSWORD = "" # os.environ.get("MAIL_PASSWORD") | ||
MAIL_DEFAULT_SENDER = "[email protected]" # os.environ.get("MAIL_DEFAULT_SENDER") | ||
MAIL_DEFAULT_SENDER = ( | ||
"[email protected]" # os.environ.get("MAIL_DEFAULT_SENDER") | ||
) | ||
|
||
|
||
class TestingConfig(Config): | ||
|
@@ -59,7 +63,11 @@ class TestingConfig(Config): | |
SERVER_NAME = "localhost.com" | ||
BCRYPT_LOG_ROUNDS = 4 | ||
TESTING = True | ||
ENV = "testing" | ||
LOGIN_DISABLED = False | ||
WTF_CSRF_ENABLED = False | ||
PREFERRED_URL_SCHEME = "http" | ||
SECRET_KEY = "abcd" | ||
|
||
|
||
app_config = { | ||
|
Oops, something went wrong.