Skip to content

Commit

Permalink
test circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkcl committed Nov 24, 2023
1 parent 51fcfce commit 077c9b7
Showing 1 changed file with 19 additions and 51 deletions.
70 changes: 19 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
python: circleci/[email protected]-browsers
# browser-tools: circleci/[email protected]
python: circleci/[email protected]
browser-tools: circleci/[email protected]

jobs:
build-and-test:
Expand All @@ -15,19 +15,6 @@ jobs:
- xpack.security.enabled: false
- transport.host: localhost
- discovery.type: single-node
# - image: selenium/standalone-chrome:110.0
# logging:
# driver: none
# volumes:
# - /dev/shm:/dev/shm
# shm_size: 4gb
# ports:
# - '4444:4444'
# environment:
# - SE_NODE_MAX_SESSIONS=100
# - SE_NODE_OVERRIDE_MAX_SESSIONS=true
# - SE_SESSION_REQUEST_TIMEOUT=400
# - SE_SESSION_RETRY_INTERVAL=2

parallelism: 4

Expand All @@ -44,6 +31,7 @@ jobs:
echo "ELASTICSEARCH_HOSTS = [{'host': 'localhost', 'port': 9200}]" > test.cfg
python portality/cms/build_fragments.py
python portality/cms/build_sass.py
# - run:
# name: Run unit tests
# command: |
Expand All @@ -55,55 +43,35 @@ jobs:
echo "SELENIUM_REMOTE_URL = ''" >> test.cfg
echo "SELENIUM_DOAJ_HOST = 'localhost'" >> test.cfg
echo "SELENIUM_HEADLESS = True" >> test.cfg
# - run:
# name: Install Docker Compose
# environment:
# COMPOSE_VERSION: 1.29.2
# command: |
# curl -L "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o ~/docker-compose
# chmod +x ~/docker-compose
# sudo mv ~/docker-compose /usr/local/bin/docker-compose
# - setup_remote_docker
# - browser-tools/install-chrome
- browser-tools/install-chrome

- run:
name: DEBUGGING
name: List current env
command: |
cat 'docker/docker-compose.yml'
which docker-compose
cat test.cfg
google-chrome --version
# - run:
# name: Run docker for selenium tests
# command: |
# docker-compose -f docker/docker-compose.yml up -d
# sleep 5


- run:
name: "[DEBUG] Run selenium tests"
command: |
pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest/test_google.py
- run:
name: "[DEBUG] Run selenium tests circleci"
command: |
pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest/test_circleci.py
# - run:
# name: Run selenium tests
# name: "[DEBUG] Run selenium tests"
# command: |
# TESTS=$(circleci tests glob "doajtest/seleniumtest/**/*.py" | circleci tests split)
# pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml $TESTS
# pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest/test_google.py
#
# - run:
# name: "[DEBUG] Run selenium tests circleci"
# command: |
# pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest/test_circleci.py

- run:
name: "[DEBUG] Run selenium tests"
name: Run selenium tests
command: |
pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest
TESTS=$(circleci tests glob "doajtest/seleniumtest/**/*.py" | circleci tests split)
pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml $TESTS
# - run:
# name: Shutdown docker
# name: "[DEBUG] Run selenium tests"
# command: |
# docker-compose -f docker/docker-compose.yml down
# pytest -v -s --color=yes --code-highlight=yes --log-level=DEBUG --junitxml=test-results/doajtest-selenium.xml doajtest/seleniumtest

- store_test_results:
path: test-results
working_directory: ~/doaj
Expand Down

0 comments on commit 077c9b7

Please sign in to comment.