Skip to content

Commit

Permalink
test works now
Browse files Browse the repository at this point in the history
removed unnesecary lines and added coments
  • Loading branch information
jehlijos authored Jun 20, 2024
1 parent d6ce38b commit 263f1b5
Showing 1 changed file with 20 additions and 27 deletions.
47 changes: 20 additions & 27 deletions .github/workflows/test_qgis_color_func.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
name: QGIS Color Table Tests
name: QGIS Color Table Tests

on: [push, pull_request]
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3 # Action to checkout the repository

- name: Set up QGIS and Python
- name: Set up QGIS and Python
run: |
sudo add-apt-repository -y ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install -y qgis python3.10 python3.10-dev python3-pip
sudo apt-get install -y qgis-plugin-grass
python3.10 -m pip install --upgrade pip
python3.10 -m pip install pytest pytest-qt PyQt6
sudo apt-get install -y gdb
- name: Set up QGIS environment variables
run: |
echo "QGIS_PREFIX_PATH=/usr" >> $GITHUB_ENV
echo "PYTHONPATH=/usr/share/qgis/python:$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
echo "QGIS_DEBUG=0" >> $GITHUB_ENV
echo "QGIS_LOG_FILE=/dev/null" >> $GITHUB_ENV
- name: Run tests
sudo add-apt-repository -y ppa:ubuntugis/ppa # Add Ubuntu GIS PPA
sudo apt-get update # Update package lists
sudo apt-get install -y qgis python3.10 python3.10-dev python3-pip # Install QGIS and Python dependencies
sudo apt-get install -y qgis-plugin-grass
python3.10 -m pip install --upgrade pip # Upgrade pip for Python 3.10
python3.10 -m pip install pytest pytest-qt PyQt6 # Install testing dependencies
- name: Run tests # Step to run tests
run: |
export QGIS_PREFIX_PATH="/usr"
export PYTHONPATH="/usr/share/qgis/python:$GITHUB_WORKSPACE"
export LD_LIBRARY_PATH="/usr/lib"
export QGIS_DEBUG=0
export QGIS_LOG_FILE=/dev/null
pytest test/test_qgis_color_func.py
export QGIS_PREFIX_PATH="/usr" # Set QGIS prefix path
export PYTHONPATH="/usr/share/qgis/python:$GITHUB_WORKSPACE" # Set Python path
export LD_LIBRARY_PATH="/usr/lib" # Set LD_LIBRARY_PATH
export QGIS_DEBUG=0 # Disable QGIS debugging
export QGIS_LOG_FILE=/dev/null # Redirect QGIS logs to /dev/null
pytest test/test_qgis_color_func.py # Run pytest for the specified test file

0 comments on commit 263f1b5

Please sign in to comment.