mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added test pipeline
This commit is contained in:
45
.github/workflows/test.yml
vendored
Normal file
45
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: UI Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
# optionally:
|
||||||
|
# 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
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore src/
|
||||||
|
|
||||||
|
- name: Build solution
|
||||||
|
run: dotnet build src/ --configuration Release --no-restore
|
||||||
|
|
||||||
|
- name: Run Selenium tests
|
||||||
|
env:
|
||||||
|
SELENIUM_HUB_URL: http://localhost:4444/wd/hub
|
||||||
|
run: dotnet test tests/Berufsschule_HAM.E2ETests/ --logger "trx;LogFileName=test-results.trx"
|
||||||
|
|
||||||
|
- name: Upload test results
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: selenium-test-results
|
||||||
|
path: "**/TestResults/*.trx"
|
||||||
Reference in New Issue
Block a user