Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
coldsofttech committed Apr 27, 2024
1 parent 4a07ba3 commit 054cd77
Showing 1 changed file with 65 additions and 9 deletions.
74 changes: 65 additions & 9 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pytest
pip install pytest-html
pip install -r requirements.txt
pip install pytest-html
- name: Install GNOME Terminal
run: |
Expand All @@ -121,18 +121,10 @@ jobs:
run: |
export $(dbus-launch)
- name: Echo
run: |
ls
- name: Run Tests
run: |
xvfb-run dbus-launch gnome-terminal -- bash -c "pytest tests -vv -rEPW -o pytest_collection_order=alphabetical --cache-clear --color=yes --html=pytest_results.html --self-contained-html"
- name: Echo
run: |
ls
- name: Check For Failures
if: always()
run: |
Expand Down Expand Up @@ -217,6 +209,70 @@ jobs:
name: ubuntu-xterm-${{ matrix.python-version }}
path: pytest_results.html

test_ubuntu_konsole:
name: Test Konsole
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
runs-on: ${{ matrix.os }}
needs: lint
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
pip install pytest-html
- name: Install Konsole Terminal
run: |
sudo apt update
sudo apt-get install -y xvfb konsole
- name: Enable Terminal Color Support
run: |
export TERM=konsole
echo $TERM
- name: Configure Display
run: |
export DISPLAY=:99.0
- name: Run Tests
run: |
konsole --hold -e xvfb-run dbus-launch gnome-terminal -- bash -c "pytest tests -vv -rEPW -o pytest_collection_order=alphabetical --cache-clear --color=yes --html=pytest_results.html --self-contained-html"
- name: Check For Failures
if: always()
run: |
failed_tests=$(grep -o '<span class="failed">\([0-9]\+\) Failed,</span>' pytest_results.html | sed 's/<[^>]*>//g' | awk '{print $1}')
echo $failed_tests
if [ "$failed_tests" -gt 0 ]; then
echo "There were $failed_tests failed test cases. Setting pipeline status to failed."
exit 1
else
echo "All tests passed. Setting pipeline status to success."
exit 0
fi
- name: Upload Report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ubuntu-gnome-${{ matrix.python-version }}
path: pytest_results.html

build:
name: Build
timeout-minutes: 20
Expand Down

0 comments on commit 054cd77

Please sign in to comment.