Skip to content

Commit

Permalink
Merge branch 'Wirecloud:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dmunozv04 committed Jan 15, 2024
2 parents da8c083 + 28fec83 commit fccf0df
Show file tree
Hide file tree
Showing 14 changed files with 341 additions and 282 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/tests.yml
Expand Up @@ -14,7 +14,7 @@ jobs:

js-unit-tests:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -38,12 +38,14 @@ jobs:

build:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Use Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Build
working-directory: ./src
run: ./setup.py bdist_wheel
Expand All @@ -56,7 +58,7 @@ jobs:

django-unit-tests:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

strategy:
matrix:
Expand All @@ -65,15 +67,16 @@ jobs:
- "2.1"
- "2.2"
python-version:
- "3.6"
#- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"

steps:
- name: Setup PostgreSQL
run: |
docker run -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 postgres:latest
docker run --rm -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 --name postgres-wirecloud postgres:latest
- uses: actions/checkout@v2
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -102,7 +105,7 @@ jobs:

django-search-indexes-tests:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

strategy:
matrix:
Expand All @@ -113,19 +116,21 @@ jobs:
steps:
- name: Setup PostgreSQL
run: |
docker run -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 postgres:latest
docker run --rm -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 --name postgres-wirecloud postgres:latest
- uses: actions/checkout@v2
- name: Use Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Use Elasticsearch
working-directory: ./src
run: |
docker run -p 9200:9200 --rm -d elasticsearch:2.4
docker run -p 9200:9200 --rm -d --name elasticsearch-wirecloud elasticsearch:2.4
if: ${{ matrix.engine == 'Elasticsearch' }}
- name: Use Solr
working-directory: ./src
run: |
docker run -p 8983:8983 --rm --name solr -d solr:6
docker run -p 8983:8983 --rm --name solr-wirecloud -d solr:6
if: ${{ matrix.engine == 'Solr' }}
- name: Setup and run tests
working-directory: ./src
Expand All @@ -143,10 +148,10 @@ jobs:
cat ci_scripts/templates/solr-conf.template >> settings.py
mkdir solr_conf
python manage.py build_solr_schema --configure-directory solr_conf
docker exec --user=solr solr bin/solr create -c tester -n basic_config
docker exec solr rm -f /opt/solr/server/solr/tester/conf/managed-schema.xml
docker cp solr_conf/schema.xml solr:/opt/solr/server/solr/tester/conf/
docker cp solr_conf/solrconfig.xml solr:/opt/solr/server/solr/tester/conf/
docker exec --user=solr solr-wirecloud bin/solr create -c tester -n basic_config
docker exec solr-wirecloud rm -f /opt/solr/server/solr/tester/conf/managed-schema.xml
docker cp solr_conf/schema.xml solr-wirecloud:/opt/solr/server/solr/tester/conf/
docker cp solr_conf/solrconfig.xml solr-wirecloud:/opt/solr/server/solr/tester/conf/
# Reload the Solr core
curl "http://localhost:8983/solr/admin/cores?action=RELOAD&core=tester"
Expand All @@ -164,21 +169,23 @@ jobs:

django-selenium-tests:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Setup PostgreSQL
run: |
docker run -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 postgres:latest
docker run --rm -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=wirecloud -d -p 5432:5432 --name postgres-wirecloud postgres:latest
- name: Use Geckodriver
uses: browser-actions/setup-geckodriver@latest
- uses: actions/checkout@v2
- name: Use Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Use Elasticsearch
working-directory: ./src
run: |
docker run -p 9200:9200 --rm -d elasticsearch:2.4
docker run -p 9200:9200 --rm -d --name elasticsearch-wirecloud elasticsearch:2.4
- name: Setup and run tests
working-directory: ./src
env:
Expand Down Expand Up @@ -210,7 +217,7 @@ jobs:
- django-selenium-tests
- js-unit-tests

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Coveralls Finished
Expand Down
16 changes: 16 additions & 0 deletions signatures/version1/cla.json
Expand Up @@ -7,6 +7,22 @@
"created_at": "2021-04-17T23:06:44Z",
"repoId": 2087417,
"pullRequestNo": 505
},
{
"name": "dmunozv04",
"id": 39565245,
"comment_id": 1768783310,
"created_at": "2023-10-18T15:53:49Z",
"repoId": 2087417,
"pullRequestNo": 532
},
{
"name": "oxixes",
"id": 38050447,
"comment_id": 1802637323,
"created_at": "2023-11-08T20:36:14Z",
"repoId": 2087417,
"pullRequestNo": 533
}
]
}
14 changes: 14 additions & 0 deletions src/manage.py
@@ -1,6 +1,20 @@
#!/usr/bin/env python
import os
import sys
# Collections.abc imports for Python 3.10+ compatibility
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
import collections
from collections.abc import Callable as collectionsCallable
from collections.abc import Iterable as collectionsIterable
from collections.abc import Iterator as collectionsIterator
from collections.abc import Mapping as collectionsMapping
from collections.abc import Sequence as collectionsSequence
collections.Callable = collectionsCallable
collections.Iterable = collectionsIterable
collections.Iterator = collectionsIterator
collections.Mapping = collectionsMapping
collections.Sequence = collectionsSequence


if __name__ == "__main__":

Expand Down
2 changes: 1 addition & 1 deletion src/requirements.txt
Expand Up @@ -12,7 +12,7 @@ regex
markdown
django-haystack>=2.8.0,<2.9.0
whoosh>=2.7.2
pycrypto
pycryptodome
pyScss>=1.3.4,<2.0
Pygments
pillow
Expand Down
8 changes: 4 additions & 4 deletions src/wirecloud/commons/utils/expected_conditions.py
Expand Up @@ -46,7 +46,7 @@ def __call__(self, driver):
try:
wrapper_element = element
if self.check_parent is True:
wrapper_element = element.find_element_by_xpath('..')
wrapper_element = element.find_element(By.XPATH, '..')

if 'disabled' in wrapper_element.get_attribute('class'):
return False
Expand All @@ -70,7 +70,7 @@ def __call__(self, driver):
ActionChains(driver).move_to_element(element).perform()
return False

top_element = top_element.find_element_by_xpath('..')
top_element = top_element.find_element(By.XPATH, '..')

return False
except (NoSuchElementException, StaleElementReferenceException):
Expand Down Expand Up @@ -162,12 +162,12 @@ def __call__(self, driver):
return False

if self.expected_owner is not None:
workspace_owner = self.testcase.driver.find_element_by_css_selector('#wirecloud_breadcrum .first_level').text
workspace_owner = self.testcase.driver.find_element(By.CSS_SELECTOR, '#wirecloud_breadcrum .first_level').text
if workspace_owner != self.expected_owner:
return False

if self.expected_name is not None:
workspace_name = self.testcase.driver.find_element_by_css_selector('#wirecloud_breadcrum .second_level').text
workspace_name = self.testcase.driver.find_element(By.CSS_SELECTOR, '#wirecloud_breadcrum .second_level').text
if workspace_name != self.expected_name:
return False

Expand Down

0 comments on commit fccf0df

Please sign in to comment.