Skip to content

ImageTool Enhancements #105

ImageTool Enhancements

ImageTool Enhancements #105

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test
on:
pull_request:
schedule:
# Every monday at 00:00 UTC (09:00 KST/JST)
- cron: "0 0 * * MON"
env:
FORCE_COLOR: 1
jobs:
test:
name: Python ${{ matrix.python-version }} tests
runs-on: ubuntu-latest
env:
DISPLAY: ':99.0'
PYTHONDONTWRITEBYTECODE : 1
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/setup-qt-libs@v1
- name: Setup for Qt testing
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Install pytest and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -v .[complete] pyqt6
- name: Test with pytest
if: matrix.python-version != '3.12'
run: |
pytest
- name: Test with pytest with coverage
if: matrix.python-version == '3.12'
run: |
pytest --cov erlab --cov-report xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}