This repository was archived by the owner on Jun 15, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 93
77 lines (73 loc) · 2.31 KB
/
ci.yml
File metadata and controls
77 lines (73 loc) · 2.31 KB
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
name: CI
on: push
jobs:
main:
strategy:
fail-fast: false
matrix:
include:
- name: "Test: Python 2.7"
python: "2.7"
tox: py27
- name: "Test: Python 3.5"
python: "3.5"
tox: py35
- name: "Test: Python 3.6"
python: "3.6"
tox: py36
- 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
coverage: true
- name: "Test: PyPy 2.7"
python: "pypy-2.7"
tox: pypy
- name: "Test: PyPy 3.7"
python: "pypy-3.7"
tox: pypy3
- name: "Lint: check-manifest"
python: "3.10"
tox: check-manifest
- name: "Lint: flake8"
python: "3.10"
tox: flake8
- name: "Docs"
python: "3.10"
tox: docs
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install libspotify
run: |
sudo mkdir -p /usr/local/share/keyrings
sudo wget -q -O /usr/local/share/keyrings/mopidy-archive-keyring.gpg https://apt.mopidy.com/mopidy.gpg
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/buster.list
sudo apt-get update
sudo apt-get install -y libspotify-dev
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-${{ hashFiles('setup.cfg', 'tox.ini') }} }}
restore-keys: |
${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-
- run: python -m pip install 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@v1
if: ${{ matrix.coverage }}