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 8b0c91c commit 824a16c
Showing 1 changed file with 0 additions and 196 deletions.
196 changes: 0 additions & 196 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,202 +77,6 @@ jobs:
name: test-${{ matrix.os }}-${{ matrix.python-version }}
path: pytest_results.html

test_ubuntu_gnome:
name: Test GNOME
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 GNOME Terminal
run: |
sudo apt update
sudo apt-get install -y at-spi2-core xvfb gnome-terminal dbus-x11
- name: Enable Terminal Color Support
run: |
export TERM=gnome-terminal
echo $TERM
- name: Configure Display
run: |
export DISPLAY=:99.0
- name: Start Dbus
run: |
export $(dbus-launch)
- 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: 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

test_ubuntu_xterm:
name: Test Xterm
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 pytest-html
pip install -r requirements.txt
- name: Install Xterm Terminal
run: |
sudo apt update
sudo apt-get install -y xvfb xterm
- name: Enable Terminal Color Support
run: |
export TERM=xterm-256color
echo $TERM
- name: Configure Display
run: |
export DISPLAY=:99.0
- name: Run Tests
run: |
xvfb-run xterm -e "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-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: |
xvfb-run konsole --hold -e "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 824a16c

Please sign in to comment.