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

Remove build frontend code in pytest CI step #4517

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/pytest.yml
Expand Up @@ -63,9 +63,6 @@ jobs:
run: npm install
- name: Update translations
run: git submodule init && git submodule update --remote && python manage.py compilemessages
# Intercom tests in Python fail if the front-end code has not been built
- name: Build front-end code
run: SKIP_TS_CHECK=true npm run build
p2edwards marked this conversation as resolved.
Show resolved Hide resolved
- name: Test back-end code
# Explicitly name the directories where coverage should be measured;
# specifying just `--cov=.` includes `src`, which contains third-party packages
Expand Down
2 changes: 1 addition & 1 deletion dependencies/pip/dev_requirements.txt
Expand Up @@ -205,7 +205,7 @@ django-trench==0.3.1
# via -r dependencies/pip/requirements.in
django-userforeignkey==0.4.0
# via django-request-cache
django-webpack-loader==1.5.0
django-webpack-loader==2.0.1
# via -r dependencies/pip/requirements.in
djangorestframework==3.13.1
# via
Expand Down
2 changes: 1 addition & 1 deletion dependencies/pip/requirements.txt
Expand Up @@ -183,7 +183,7 @@ django-trench==0.3.1
# via -r dependencies/pip/requirements.in
django-userforeignkey==0.4.0
# via django-request-cache
django-webpack-loader==1.5.0
django-webpack-loader==2.0.1
# via -r dependencies/pip/requirements.in
djangorestframework==3.13.1
# via
Expand Down
13 changes: 10 additions & 3 deletions kobo/settings/testing.py
Expand Up @@ -6,8 +6,10 @@
# For tests, don't use KoBoCAT's DB
DATABASES = {
'default': env.db_url(
'KPI_DATABASE_URL' if 'KPI_DATABASE_URL' in os.environ else 'DATABASE_URL',
default='sqlite:///%s/db.sqlite3' % BASE_DIR
'KPI_DATABASE_URL'
if 'KPI_DATABASE_URL' in os.environ
else 'DATABASE_URL',
default='sqlite:///%s/db.sqlite3' % BASE_DIR,
),
}

Expand All @@ -26,7 +28,8 @@

MONGO_CONNECTION_URL = 'mongodb://fakehost/formhub_test'
mongo_client = MockMongoClient(
MONGO_CONNECTION_URL, connect=False, journal=True, tz_aware=True)
MONGO_CONNECTION_URL, connect=False, journal=True, tz_aware=True
)
MONGO_DB = mongo_client['formhub_test']

ENKETO_URL = 'http://enketo.mock'
Expand All @@ -38,3 +41,7 @@
if "djstripe" not in INSTALLED_APPS:
INSTALLED_APPS += ('djstripe', "kobo.apps.stripe")
STRIPE_ENABLED = True

WEBPACK_LOADER['DEFAULT'][
'LOADER_CLASS'
] = 'webpack_loader.loader.FakeWebpackLoader'