File: ci.yml

package info (click to toggle)
mopidy 3.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,608 kB
  • sloc: python: 16,656; sh: 159; makefile: 127
file content (65 lines) | stat: -rw-r--r-- 1,757 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
name: CI

on:
  pull_request:
  push:
    branches: [ develop, master ]

jobs:
  main:
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: "Test: Python 3.7"
            python: "3.7"
            tox: py37
          - name: "Test: Python 3.8"
            python: "3.8"
            tox: py38
          - name: "Test: Python 3.9"
            python: "3.9"
            tox: py39
          - name: "Test: Python 3.10"
            python: "3.10"
            tox: py310
          - name: "Test: Python 3.11"
            python: "3.11"
            tox: py311
          - name: "Test: Python 3.12"
            python: "3.12"
            tox: py312
            coverage: true
          - name: "Lint: check-manifest"
            python: "3.12"
            tox: check-manifest
          - name: "Lint: flake8"
            python: "3.12"
            tox: flake8
          - name: "Lint: mypy"
            python: "3.12"
            tox: mypy
          - name: "Docs"
            python: "3.12"
            tox: docs

    name: ${{ matrix.name }}
    runs-on: ubuntu-22.04
    container: ghcr.io/mopidy/ci:latest

    steps:
      - uses: actions/checkout@v3
      - name: Fix home dir permissions to enable pip caching
        run: chown -R root /github/home
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python }}
          cache: pip
          cache-dependency-path: setup.cfg
      - run: python -m pip install pygobject tox
      - run: python -m tox -e ${{ matrix.tox }}
        if: ${{ ! matrix.coverage }}
      - run: python -m tox -e ${{ matrix.tox }} -- --cov-report=xml
        if: ${{ matrix.coverage }}
      - uses: codecov/codecov-action@v3
        if: ${{ matrix.coverage }}