Using mopidy-tunein as starting point
This commit is contained in:
65
.github/workflows/python-tests.yml
vendored
65
.github/workflows/python-tests.yml
vendored
@ -5,29 +5,50 @@ on:
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
main:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
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
|
||||
coverage: true
|
||||
- name: "Lint: check-manifest"
|
||||
python: "3.9"
|
||||
tox: check-manifest
|
||||
- name: "Lint: flake8"
|
||||
python: "3.9"
|
||||
tox: flake8
|
||||
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ubuntu-20.04
|
||||
container: ghcr.io/mopidy/ci:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update \
|
||||
&& sudo apt-get install -y \
|
||||
python-dbus python-gobject \
|
||||
python3-dbus python3-gi \
|
||||
&& sudo rm -rf /var/lib/apt/lists/*
|
||||
- name: Install python dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install tox tox-gh-actions
|
||||
python3 -m pip install -e .
|
||||
- name: Test with tox
|
||||
run: tox
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- 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-
|
||||
- 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@v1
|
||||
if: ${{ matrix.coverage }}
|
||||
Reference in New Issue
Block a user