File: test.yml

package info (click to toggle)
python-mido 1.3.3-0.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 920 kB
  • sloc: python: 4,006; makefile: 127; sh: 4
file content (128 lines) | stat: -rw-r--r-- 3,539 bytes parent folder | download | duplicates (2)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# SPDX-FileCopyrightText: 2020 Ole Martin Bjorndalen <ombdalen@gmail.com>
#
# SPDX-License-Identifier: CC0-1.0

name: Tests

on:
  pull_request:
    branches:
      - main
  push:
    branches-ignore:
      - gh-pages
  workflow_dispatch:

jobs:

  style:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version-file: 'pyproject.toml'
          cache: 'pip'
      - name: Upgrade pip
        run: python3 -m pip install --upgrade pip setuptools wheel
      - name: Install mido in dev mode
        run: python3 -m pip install --quiet .[lint-code]
      - name: Lint code with ruff
        run: ruff check .
        env:
          RUFF_OUTPUT_FORMAT: github

  reuse:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version-file: 'pyproject.toml'
          cache: 'pip'
      - name: Upgrade pip
        run: python3 -m pip install --upgrade pip setuptools wheel
      - name: Install mido in dev mode
        run: python3 -m pip install --quiet .[lint-reuse]
      - name: Lint reuse
        run: reuse lint

  manifest:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version-file: 'pyproject.toml'
          cache: 'pip'
      - name: Upgrade pip
        run: python3 -m pip install --upgrade pip setuptools wheel
      - name: Install mido in dev mode
        run: python3 -m pip install --quiet .[check-manifest]
      - name: Check manifest is complete
        run: check-manifest --verbose

  docs:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version-file: 'pyproject.toml'
          cache: 'pip'
      - name: Upgrade pip
        run: python3 -m pip install --upgrade pip setuptools wheel
      - name: Install mido in dev mode
        run: python3 -m pip install --quiet .[build-docs]
      - name: Check documentation
        run: sphinx-build -b linkcheck -j auto -q -W -E --keep-going docs docs/_build

  test:
    needs:
      - docs
      - manifest
      - reuse
      - style
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - macOS-latest
          - ubuntu-latest
          - windows-latest
        python-version:
            - '3.7'
            - '3.8'
            - '3.9'
            - '3.10'
            - '3.11'
            - '3.12'
            - '3.13'
        exclude:  # Python < v3.8 does not support Apple Silicon ARM64.
          - python-version: "3.7"
            os: macOS-latest
        include: # So run those legacy versions on Intel CPUs.
          - python-version: "3.7"
            os: macOS-13
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
      - name: Upgrade pip
        run: python3 -m pip install --upgrade pip setuptools wheel
      - name: Install mido in dev mode
        run: python3 -m pip install --quiet .[test-code]
      - name: Test with pytest
        run: pytest