-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (61 loc) · 2 KB
/
ci.yml
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: Python build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
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
coverage-upload: true
- name: 'Test: Python latest 3.x'
python: '3.x'
tox: py3x
- name: 'Lint: flake8'
python: '3.10'
tox: flake8
- name: 'Lint: twine check'
python: '3.10'
tox: twine
name: ${{ matrix.name }}
runs-on: ubuntu-20.04
container: ghcr.io/mopidy/ci:latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Display Python version
run: python --version
- name: Fix home dir permissions to enable pip caching
run: chown -R root /github/home
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-${{ hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python }}-${{ matrix.tox }}-pip-
- name: Install pygobject & tox
run: python -m pip install pygobject tox
- name: tox
run: python -m tox -e ${{ matrix.tox }}
- name: Install coveralls
run: python -m pip install coveralls
if: ${{ matrix.coverage-upload }}
- name: Coveralls
if: ${{ matrix.coverage-upload }}
run: python -m coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}