mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added chrome installation to test pipeline
This commit is contained in:
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -3,21 +3,12 @@ name: E2E Tests
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "*" ]
|
branches: [ "*" ]
|
||||||
# optionally:
|
workflow_dispatch:
|
||||||
# workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
selenium-tests:
|
selenium-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
|
||||||
selenium:
|
|
||||||
image: selenium/standalone-chromium
|
|
||||||
ports:
|
|
||||||
- 4444:4444
|
|
||||||
options: >-
|
|
||||||
--shm-size=2g
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -27,6 +18,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
- name: Install Chrome and ChromeDriver
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y chromium-browser chromium-chromedriver
|
||||||
|
# Symlink to expected locations for Selenium
|
||||||
|
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver || true
|
||||||
|
|
||||||
|
- name: Verify Chrome install
|
||||||
|
run: |
|
||||||
|
chromium-browser --version
|
||||||
|
chromedriver --version
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore src/
|
run: dotnet restore src/
|
||||||
|
|
||||||
@@ -35,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Selenium tests
|
- name: Run Selenium tests
|
||||||
env:
|
env:
|
||||||
SELENIUM_HUB_URL: http://localhost:4444/wd/hub
|
DOTNET_ENVIRONMENT: Development
|
||||||
run: dotnet test tests/Berufsschule_HAM.E2ETests/ --logger "trx;LogFileName=test-results.trx"
|
run: dotnet test tests/Berufsschule_HAM.E2ETests/ --logger "trx;LogFileName=test-results.trx"
|
||||||
|
|
||||||
- name: Upload test results
|
- name: Upload test results
|
||||||
|
|||||||
Reference in New Issue
Block a user