Skip to content

Commit

Permalink
ci: debug chromedriver (#3891)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpcross authored Dec 12, 2024
1 parent 3c1a835 commit b5a4242
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/manual-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

jobs:
trigger-workflow:
uses: ./.github/workflows/tests.yml
uses: ./.github/workflows/tests_debug.yml
with:
ignoreLowerCoverage: ${{ inputs.ignoreLowerCoverage }}
skipSelenium: ${{ inputs.skipSelenium }}
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/tests_debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Reusable Tests Workflow

on:
workflow_call:
inputs:
ignoreLowerCoverage:
description: 'Ignore Lower Coverage'
default: false
required: true
type: boolean
skipSelenium:
description: 'Skip Selenium Tests'
default: false
required: false
type: boolean
targetBaseVersion:
description: 'Target Base Image Version'
default: latest
required: false
type: string

jobs:
tests-python:
name: Python Tests
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/mailarchive-app-base:${{ inputs.targetBaseVersion }}

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.21
ports:
- 9200:9200
- 9300:9300
options: >-
--health-cmd="curl -s http://localhost:9200/_cat/health > /dev/null"
--health-interval=10s
--health-timeout=5s
--health-retries=5
--name elasticsearch-service
env:
discovery.type: single-node
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
xpack.security.enabled: "false"

db:
image: postgres:14
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
POSTGRES_USER: mailarchive
POSTGRES_PASSWORD: RkTkDPFnKpko
POSTGRES_DB: test_mailarchive

steps:
- uses: actions/checkout@v4

- name: Prepare for tests
run: |
chmod +x ./dev/tests/prepare.sh
sh ./dev/tests/prepare.sh
- name: Test ChromeDriver Execution
run: |
/github/home/.cache/selenium/chromedriver/linux64/131.0.6778.108/chromedriver --version
- name: Run all tests
shell: bash
run: |
echo "Running tests..."
cd backend/mlarchive
pytest tests -v

0 comments on commit b5a4242

Please sign in to comment.