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:
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
@@ -3,21 +3,12 @@ name: E2E Tests
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
# optionally:
|
||||
# workflow_dispatch:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
selenium-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
selenium:
|
||||
image: selenium/standalone-chromium
|
||||
ports:
|
||||
- 4444:4444
|
||||
options: >-
|
||||
--shm-size=2g
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -27,6 +18,18 @@ jobs:
|
||||
with:
|
||||
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
|
||||
run: dotnet restore src/
|
||||
|
||||
@@ -35,9 +38,9 @@ jobs:
|
||||
|
||||
- name: Run Selenium tests
|
||||
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"
|
||||
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user