Skip to content

Commit

Permalink
Merge pull request #34 from jodal/ci
Browse files Browse the repository at this point in the history
Move CI to GitHub Actions
  • Loading branch information
jodal committed Jan 2, 2021
2 parents 353420a + 256ae67 commit d5b1b91
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 66 deletions.
57 changes: 0 additions & 57 deletions .circleci/config.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on: [push, pull_request]

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
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@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 }}
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include MANIFEST.in
include pyproject.toml
include tox.ini

recursive-include .circleci *
recursive-include .github *

include mopidy_*/ext.conf
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Mopidy-Beets
:target: https://pypi.org/project/Mopidy-Beets/
:alt: Latest PyPI version

.. image:: https://img.shields.io/circleci/build/gh/mopidy/mopidy-beets
:target: https://circleci.com/gh/mopidy/mopidy-beets
:alt: CircleCI build status
.. image:: https://img.shields.io/github/workflow/status/mopidy/mopidy-beets/CI
:target: https://github.com/mopidy/mopidy-beets/actions
:alt: CI build status

.. image:: https://img.shields.io/codecov/c/gh/mopidy/mopidy-beets
:target: https://codecov.io/gh/mopidy/mopidy-beets
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ lint =
black
check-manifest
flake8
flake8-black
flake8-bugbear
flake8-import-order
isort[pyproject]
Expand Down
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37, py38, py39, black, check-manifest, flake8
envlist = py37, py38, py39, check-manifest, flake8

[testenv]
sitepackages = true
Expand All @@ -10,10 +10,6 @@ commands =
--cov=mopidy_beets --cov-report=term-missing \
{posargs}

[testenv:black]
deps = .[lint]
commands = python -m black --check .

[testenv:check-manifest]
deps = .[lint]
commands = python -m check_manifest
Expand Down

0 comments on commit d5b1b91

Please sign in to comment.