Skip to content

PR: Add initial pre-commit config file and fix CI (macOS image label and codecov token errors) #233

PR: Add initial pre-commit config file and fix CI (macOS image label and codecov token errors)

PR: Add initial pre-commit config file and fix CI (macOS image label and codecov token errors) #233

Workflow file for this run

name: Linux tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
linux:
name: Linux Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }}
timeout-minutes: 15
runs-on: ubuntu-latest
env:
CI: True
QT_API: ${{ matrix.QT_BINDING }}
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
RUNNER_OS: 'ubuntu'
COVERALLS_REPO_TOKEN: XWVhJf2AsO7iouBLuCsh0pPhwHy81Uz1v
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.7', '3.10']
QT_BINDING: ['pyqt5', 'pyside2']
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Install System Packages
run: |
sudo apt-get update --fix-missing
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing
- name: Install Conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: false
auto-activate-base: false
python-version: ${{ matrix.PYTHON_VERSION }}
channels: conda-forge
channel-priority: strict
- name: Install dependencies
shell: bash -l {0}
run: conda env update --file requirements/environment_tests_${{ matrix.QT_BINDING }}.yml
- name: Install Package
shell: bash -l {0}
run: pip install -e .
- name: Show environment information
shell: bash -l {0}
run: |
conda info
conda list
- name: Run tests
shell: bash -l {0}
run: |
xvfb-run --auto-servernum python example.py
xvfb-run --auto-servernum pytest -x -vv --cov-report xml --cov=qtawesome qtawesome
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}