Skip to content

Commit

Permalink
tests: update CI matrix
Browse files Browse the repository at this point in the history
chore: formatting
  • Loading branch information
kpsherva committed Feb 8, 2024
1 parent cb1fc7b commit b65406a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
python-version: [3.8, 3.9]
requirements-level: [pypi]
db-service: [postgresql14]
search-service: [opensearch2,elasticsearch7]
search-service: [opensearch2]
include:
- db-service: postgresql14
DB_EXTRAS: "postgresql"
Expand Down
1 change: 0 additions & 1 deletion invenio_communities/communities/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ class CommunityThemeConfigSchema(Schema):
mainHeaderBackgroundColor = fields.Str()



class CommunityThemeSchema(Schema):
"""Community theme schema."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ <h1 class="ui medium header mb-0">{{ community.metadata.title }}</h1>
</div>
</div>
</div>

<div
class="sixteen wide mobile sixteen wide tablet three wide computer right aligned middle aligned column">
<a href="/uploads/new?community={{ community.slug }}"
class="ui positive button labeled icon rel-mt-1 theme-secondary">
<i class="upload icon" aria-hidden="true"></i>
{{ _("New upload") }}
</a>
{%- if not community_use_jinja_header %}
<a href="/uploads/new?community={{ community.slug }}"
class="ui positive button labeled icon rel-mt-1 theme-secondary">
<i class="upload icon" aria-hidden="true"></i>
{{ _("New upload") }}
</a>
{% endif %}
{% if permissions.can_moderate %}
<a
href="{{ url_for('administration.communities', q='slug:'+community.slug) }}"
Expand All @@ -128,15 +129,15 @@ <h1 class="ui medium header mb-0">{{ community.metadata.title }}</h1>
<div
class="ui container secondary pointing stackable menu page-subheader pl-0 pr-0 theme-primary">
{% if community_menu_active %}
{% for item in current_menu.submenu('communities').children if (item.permissions == True or permissions[item.permissions]) and item.visible %}
<a
class="item {{ 'active' if active_community_header_menu_item == item.name }} {{ 'disabled' if not item.url }}"
href="{{ item.url }}"
>
<i aria-hidden="true" class="{{ item.icon }} icon"></i>
{{ item.text }}
</a>
{% endfor %}
{% for item in current_menu.submenu('communities').children if (item.permissions == True or permissions[item.permissions]) and item.visible %}
<a
class="item {{ 'active' if active_community_header_menu_item == item.name }} {{ 'disabled' if not item.url }}"
href="{{ item.url }}"
>
<i aria-hidden="true" class="{{ item.icon }} icon"></i>
{{ item.text }}
</a>
{% endfor %}
{% endif %}
</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ tests =
invenio-db[postgresql,mysql]>=1.0.14,<2.0.0
pytest-invenio>=2.1.4,<3.0.0
sphinx>=4.5.0
elasticsearch7 =
invenio-search[elasticsearch7]>=2.1.0,<3.0.0
opensearch1 =
invenio-search[opensearch1]>=2.1.0,<3.0.0
opensearch2 =
Expand Down
24 changes: 12 additions & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ def build(cls, **kwargs):
@pytest.fixture(scope="module")
def app_config(app_config):
"""Override pytest-invenio app_config fixture."""
app_config["RECORDS_REFRESOLVER_CLS"] = (
"invenio_records.resolver.InvenioRefResolver"
)
app_config["RECORDS_REFRESOLVER_STORE"] = (
"invenio_jsonschemas.proxies.current_refresolver_store"
)
app_config[
"RECORDS_REFRESOLVER_CLS"
] = "invenio_records.resolver.InvenioRefResolver"
app_config[
"RECORDS_REFRESOLVER_STORE"
] = "invenio_jsonschemas.proxies.current_refresolver_store"
# Variable not used. We set it to silent warnings
app_config["JSONSCHEMAS_HOST"] = "not-used"

Expand All @@ -106,9 +106,9 @@ def app_config(app_config):
app_config["COMMUNITIES_IDENTITIES_CACHE_REDIS_URL"] = "redis://localhost:6379/4"

# Cache handler
app_config["COMMUNITIES_IDENTITIES_CACHE_HANDLER"] = (
"invenio_communities.cache.redis:IdentityRedisCache"
)
app_config[
"COMMUNITIES_IDENTITIES_CACHE_HANDLER"
] = "invenio_communities.cache.redis:IdentityRedisCache"

app_config["MAIL_DEFAULT_SENDER"] = "test@invenio-rdm-records.org"

Expand All @@ -135,9 +135,9 @@ def app_config(app_config):
]

# Extending preferences schemas, to include notification preferences. Should not matter for most test cases
app_config["ACCOUNTS_USER_PREFERENCES_SCHEMA"] = (
UserPreferencesNotificationsSchema()
)
app_config[
"ACCOUNTS_USER_PREFERENCES_SCHEMA"
] = UserPreferencesNotificationsSchema()
app_config["USERS_RESOURCES_SERVICE_SCHEMA"] = NotificationsUserSchema

# Users are verified by default. This will disable the automatic creation of moderation requests after publishing a record.
Expand Down

0 comments on commit b65406a

Please sign in to comment.