Bump org.seleniumhq.selenium:selenium-chrome-driver in /java-framewor… #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run E2E tests | |
env: | |
LOG_LEVEL: debug | |
ENVIRONMENT: staging | |
suiteXmlFile: regression.xml | |
browser: remote-chrome | |
headlessBrowser: false | |
testsThreadCount: 10 | |
working-directory: ./java-framework | |
report-directory: ./java-framework/target/surefire-reports | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run tests against' | |
type: environment | |
required: true | |
default: staging | |
options: | |
- master | |
- staging | |
- develop | |
chromeVersion: | |
description: 'Chrome Version' | |
required: true | |
default: '110' | |
type: choice | |
options: | |
- "latest" | |
- "110" | |
workflow_call: | |
inputs: | |
environment: # Target environment | |
required: true | |
type: string | |
branch: # Source branch | |
required: true | |
type: string | |
outputs: | |
workflow-status: | |
description: The final status of this workflow | |
value: ${{ jobs.build-and-test.outputs.workflow-status }} | |
secrets: | |
github-token: | |
required: true | |
push: | |
branches: | |
- staging | |
- master | |
paths: java-framework/** | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
outputs: | |
workflow-status: ${{ steps.set_status.outputs.workflow-status }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
services: | |
website: | |
image: gprestes/the-internet:latest | |
ports: | |
- 7080:5000 | |
options: >- | |
--rm | |
selenium-hub: | |
image: selenium/hub:latest | |
ports: | |
- 4442:4442 | |
- 4443:4443 | |
- 4444:4444 | |
options: >- | |
--rm | |
-v /dev/shm:/dev/shm | |
env: | |
SE_VNC_NO_PASSWORD: 1 | |
SE_SESSION_RETRY_INTERVAL: 1 | |
SE_START_XVFB: true | |
SE_SCREEN_WIDTH: 1920 | |
SE_SCREEN_HEIGHT: 1080 | |
chrome-node-video: | |
image: selenium/video:latest | |
options: >- | |
-v /home/runner/work/the-internet-tests/java-framework/target:/home/seluser/Downloads | |
-v /home/runner/work/the-internet-tests/java-framework/target/surefire-reports:/videos | |
env: | |
SE_EVENT_BUS_HOST: selenium-hub | |
SE_EVENT_BUS_PUBLISH_PORT: 4442 | |
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443 | |
SE_SESSION_RETRY_INTERVAL: 1 | |
SE_NODE_MAX_INSTANCES: 20 | |
SE_NODE_MAX_SESSIONS: 1 | |
SE_NODE_SESSION_TIMEOUT: 500 | |
SE_START_XVFB: true | |
DISPLAY_CONTAINER_NAME: chrome-node | |
FILE_NAME: chrome_video.mp4 | |
chrome-node: | |
image: selenium/node-chrome:latest | |
options: >- | |
-v /home/runner/work/the-internet-tests/java-framework/target:/home/seluser/Downloads | |
env: | |
SE_EVENT_BUS_HOST: selenium-hub | |
SE_EVENT_BUS_PUBLISH_PORT: 4442 | |
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443 | |
SE_SESSION_RETRY_INTERVAL: 1 | |
SE_NODE_MAX_INSTANCES: 20 | |
SE_NODE_MAX_SESSIONS: 4 | |
SE_NODE_SESSION_TIMEOUT: 500 | |
SE_START_XVFB: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.branch }} | |
fetch-depth: 0 | |
# token: ${{ secrets.github-token || secrets.WORKFLOW_TOKEN }} | |
- name: Set up Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Cached Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build and test | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: mvn clean install -DsuiteXmlFile=${{ env.suiteXmlFile }} -Djava.awt.headless=${{ env.headlessBrowser }} | |
working-directory: ${{ env.working-directory }} | |
- name: Archive test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: ${{ env.report-directory }} | |
- name: Set job status | |
id: set_status | |
run: | | |
if [[ "${{ job.status }}" == "success" ]]; then | |
echo "workflow-status=success" >> $GITHUB_OUTPUT | |
else | |
echo "workflow-status=failure" >> $GITHUB_OUTPUT | |
fi |