File: tests.yml

package info (click to toggle)
python-blessed 1.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,812 kB
  • sloc: python: 14,645; makefile: 13; sh: 7
file content (76 lines) | stat: -rw-r--r-- 2,304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Tests

on:
  push:
  pull_request:
  release:
  schedule:
    # Every Thursday at 1 AM
    - cron: '0 1 * * 4'

jobs:

  Tests:

    continue-on-error: ${{ matrix.optional || false }}
    runs-on: ${{ matrix.os || 'ubuntu-latest' }}
    container: ${{ !startsWith(matrix.os, 'windows') && (matrix.container || format('python:{0}', matrix.python-version)) || null }}
    name: ${{ matrix.label || matrix.python-version }} ${{ startsWith(matrix.os, 'windows') && '(Windows)' || '' }} ${{ matrix.optional && '[OPTIONAL]' }}

    strategy:
      fail-fast: false
      matrix:
        python-version:  ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.14']
        test_quick: [1]

        include:
          - python-version: '3.13'
            label: Linting
            toxenv: docformatter_check,flake8,flake8_tests,isort_check,mypy,sphinx,pydocstyle,pylint,pylint_tests,codespell
            os-deps:
              - enchant-2

          - python-version: '3.13'
            test_keyboard: 1
            test_raw: 1
            test_quick: 0

          - python-version: '3.13'
            os: windows-latest
            test_quick: 0


    env:
      TOXENV: ${{ matrix.toxenv || format('py{0}', matrix.python-version) }}
      TEST_QUICK: ${{ matrix.test_quick || 0 }}
      TEST_KEYBOARD: ${{ matrix.test_keyboard || 0 }}
      TEST_RAW: ${{ matrix.test_raw || 0 }}
      TOXPYTHON: python${{ matrix.toxpython || matrix.python-version }}

    steps:

      - name: Install OS Dependencies
        run: apt update && apt -y install ${{ join(matrix.os-deps, ' ') }}
        if: ${{ matrix.os-deps }}

      - uses: actions/checkout@v4

      - name: Install tox
        run: pip install tox

      - name: Collect terminal information
        run: tox -e about

      - name: Run tox
        run: tox

      - name: Upload to Codecov
        if: ${{ matrix.label != 'linting' }}
        uses: codecov/codecov-action@v5
        with:
          verbose: true
          name: ${{ matrix.label || matrix.python-version }} ${{ startsWith(matrix.os, 'windows') && '(Windows)' || '' }}
          token: ${{ secrets.CODECOV_TOKEN }}
          fail_ci_if_error: true
          os: ${{ startsWith(matrix.os, 'windows') && 'windows' || 'linux' }}
          env_vars: TOXENV,TEST_QUICK,TEST_KEYBOARD,TEST_RAW