Skip to content

QE-12061 add publish gh actions #27

QE-12061 add publish gh actions

QE-12061 add publish gh actions #27

Workflow file for this run

name: build
on:
pull_request:
push:
branches: [main]
jobs:
# lint:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# - name: Install depedencies
# run: |
# pip install poetry
# poetry install --no-ansi
# - uses: pre-commit/action@v3.0.1
# API-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# - name: Install depedencies
# run: |
# pip install poetry
# poetry install --no-ansi
# - name: unit tests
# run: |
# poetry run coverage run -m pytest --junit-xml=results/unit-tests.xml
UI-tests:
runs-on: ubuntu-latest
permissions: # to publish junit results - see https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#permissions
contents: read
issues: read
checks: write
pull-requests: write
services:
webserver:
image: selenium/standalone-chrome:124.0
ports:
- 4444:4444
options: --shm-size=2gb
env:
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
SCREEN_WIDTH: 1366
SCREEN_HEIGHT: 768
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install depedencies
run: |
pip install poetry
poetry install --no-ansi
- name: wait_for_selenium
# retry connection every 2s x 60 which is a total of 2 minutes
run: curl --retry 60 --retry-delay 2 --retry-connrefused http://localhost:4444
- name: UI tests
run: |
poetry run cucu run features --browser "chrome" --workers 1 --generate-report --report output/report --junit output/junit --selenium-remote-url http://localhost:4444
tar cvfz output.tgz output
env:
# COVERAGE_PROCESS_START: pyproject.toml
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
SCREEN_WIDTH: 1366
SCREEN_HEIGHT: 768
DISPLAY: :99 # Needed for headless mode
SELENIUM_HOST: localhost
SELENIUM_PORT: 4444
- name: save output
if: always()
uses: actions/upload-artifact@v4
with:
name: chrome-tests
path: output.tgz
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "chrome results"
files: |
output/junit/**/*.xml