Skip to content
Latchkey

Windows tests workflow (spyder-ide/qtawesome)

The Windows tests workflow from spyder-ide/qtawesome, explained and optimized by Latchkey.

B

CI health: B - good

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: spyder-ide/qtawesome.github/workflows/windows-tests.ymlLicense MITView source

What it does

This is the Windows tests workflow from the spyder-ide/qtawesome repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Windows tests

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  windows-qt5:
    name: Windows Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }} - ${{ matrix.QT_BINDING_VERSION }}
    timeout-minutes: 15
    runs-on: windows-latest
    env:
      CI: True
      QT_API:  ${{ matrix.QT_BINDING }}
      PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
      RUNNER_OS: 'windows'
    strategy:
      fail-fast: false
      matrix:
        PYTHON_VERSION: ['3.9', '3.13']
        QT_BINDING: ['pyqt5', 'pyside2']
        include:
          - QT_BINDING_VERSION: 'latest'
          - PYTHON_VERSION: '3.10'
            QT_BINDING: 'pyside2'
            QT_BINDING_VERSION: 'latest'
        exclude:
          - PYTHON_VERSION: '3.13'
            QT_BINDING: 'pyside2'
    steps:
      - name: Checkout branch
        uses: actions/checkout@v1
      - name: Install Conda
        uses: conda-incubator/setup-miniconda@v3
        with:
           activate-environment: test
           auto-update-conda: false
           auto-activate: false
           python-version: ${{ matrix.PYTHON_VERSION }}
           channels: conda-forge
           channel-priority: strict
           conda-remove-defaults: true
      - name: Install package dependencies
        shell: bash -l {0}
        run: conda env update --file requirements/environment_tests_${{ matrix.QT_BINDING }}_${{ matrix.QT_BINDING_VERSION }}.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: |
          python example.py
          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 }}

  windows-qt6:
    name: Windows Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }} - ${{ matrix.QT_BINDING_VERSION }}
    timeout-minutes: 15
    runs-on: windows-latest
    env:
      CI: True
      QT_API:  ${{ matrix.QT_BINDING }}
      PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
      RUNNER_OS: 'windows'
    strategy:
      fail-fast: false
      matrix:
        PYTHON_VERSION: ['3.9', '3.13']
        QT_BINDING: ['pyqt6', 'pyside6']
        include:
          - QT_BINDING_VERSION: 'latest'
    steps:
      - name: Checkout branch
        uses: actions/checkout@v1
      - name: Install Conda
        uses: conda-incubator/setup-miniconda@v3
        with:
           activate-environment: test
           auto-update-conda: false
           auto-activate: false
           python-version: ${{ matrix.PYTHON_VERSION }}
           channels: conda-forge
           channel-priority: strict
           conda-remove-defaults: true
      - name: Install package dependencies
        shell: bash -l {0}
        run: conda env update --file requirements/environment_tests_${{ matrix.QT_BINDING }}_${{ matrix.QT_BINDING_VERSION }}.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: |
          python example.py
          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 }}

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Windows tests
 
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master
 
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
 
jobs:
  windows-qt5:
    name: Windows Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }} - ${{ matrix.QT_BINDING_VERSION }}
    timeout-minutes: 15
    runs-on: windows-latest
    env:
      CI: True
      QT_API:  ${{ matrix.QT_BINDING }}
      PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
      RUNNER_OS: 'windows'
    strategy:
      fail-fast: false
      matrix:
        PYTHON_VERSION: ['3.9', '3.13']
        QT_BINDING: ['pyqt5', 'pyside2']
        include:
          - QT_BINDING_VERSION: 'latest'
          - PYTHON_VERSION: '3.10'
            QT_BINDING: 'pyside2'
            QT_BINDING_VERSION: 'latest'
        exclude:
          - PYTHON_VERSION: '3.13'
            QT_BINDING: 'pyside2'
    steps:
      - name: Checkout branch
        uses: actions/checkout@v1
      - name: Install Conda
        uses: conda-incubator/setup-miniconda@v3
        with:
           activate-environment: test
           auto-update-conda: false
           auto-activate: false
           python-version: ${{ matrix.PYTHON_VERSION }}
           channels: conda-forge
           channel-priority: strict
           conda-remove-defaults: true
      - name: Install package dependencies
        shell: bash -l {0}
        run: conda env update --file requirements/environment_tests_${{ matrix.QT_BINDING }}_${{ matrix.QT_BINDING_VERSION }}.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: |
          python example.py
          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 }}
 
  windows-qt6:
    name: Windows Py${{ matrix.PYTHON_VERSION }} - ${{ matrix.QT_BINDING }} - ${{ matrix.QT_BINDING_VERSION }}
    timeout-minutes: 15
    runs-on: windows-latest
    env:
      CI: True
      QT_API:  ${{ matrix.QT_BINDING }}
      PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
      RUNNER_OS: 'windows'
    strategy:
      fail-fast: false
      matrix:
        PYTHON_VERSION: ['3.9', '3.13']
        QT_BINDING: ['pyqt6', 'pyside6']
        include:
          - QT_BINDING_VERSION: 'latest'
    steps:
      - name: Checkout branch
        uses: actions/checkout@v1
      - name: Install Conda
        uses: conda-incubator/setup-miniconda@v3
        with:
           activate-environment: test
           auto-update-conda: false
           auto-activate: false
           python-version: ${{ matrix.PYTHON_VERSION }}
           channels: conda-forge
           channel-priority: strict
           conda-remove-defaults: true
      - name: Install package dependencies
        shell: bash -l {0}
        run: conda env update --file requirements/environment_tests_${{ matrix.QT_BINDING }}_${{ matrix.QT_BINDING_VERSION }}.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: |
          python example.py
          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 }}
 

What changed

2 third-party actions are referenced by a movable tag. Pin them to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 2 jobs (8 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow