QE-12061 add publish gh actions #17
Workflow file for this run
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: 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 | |
# # container: | |
# # image: selenium/standalone-chrome:124.0 | |
# # options: --shm-size=2gb | |
# # ports: | |
# # - 4444:4444 | |
# # 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 | |
# - name: Install depedencies | |
# run: | | |
# pip install poetry | |
# poetry install --no-ansi | |
# - name: Install Google Chrome and ChromeDriver | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y wget | |
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
# sudo apt install -y ./google-chrome-stable_current_amd64.deb | |
# wget https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip | |
# unzip chromedriver_linux64.zip | |
# sudo mv chromedriver /usr/local/bin/chromedriver | |
# sudo chmod +x /usr/local/bin/chromedriver | |
# # - name: wait_for_selenium | |
# # # retry connection every 5s x 60 which is a total of 5 minutes | |
# # run: curl --retry 2 --retry-delay 2 --retry-connrefused http://localhost:4444 | |
# - name: UI tests | |
# # env: | |
# # COVERAGE_PROCESS_START: pyproject.toml | |
# run: | | |
# poetry run cucu run features/cli/help.feature --workers 1 --generate-report --junit junit_results --browser "chrome" --selenium-remote-url http://localhost:4444 | |
# env: | |
# 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 |