Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: python -m unittest cmus_status_scrobbler.py tests.py test_cmus_status_scrobbler.py
typecheck:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install typecheck dependencies
run: python -m pip install -r requirements-dev.txt
- name: Run typecheck
run: make typecheck PYTHON=python
27 changes: 0 additions & 27 deletions .github/workflows/run-tests.yml

This file was deleted.

22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PYTHON ?= ./venv/bin/python
VENV ?= ./venv
VENV_PYTHON := $(VENV)/bin/python
FILES := cmus_status_scrobbler.py tests.py test_cmus_status_scrobbler.py

.PHONY: test typecheck format check venv

test:
$(PYTHON) -m unittest $(FILES)

typecheck:
$(PYTHON) -m mypy --strict --check-untyped-defs $(FILES)
$(PYTHON) -m pyright $(FILES)

format:
$(PYTHON) -m yapf -i $(FILES)

check: typecheck test

venv:
python3 -m venv $(VENV)
$(VENV_PYTHON) -m pip install -r requirements-dev.txt
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# cmus-status-scrobbler

![tests passing status](https://github.com/vjeranc/cmus-status-scrobbler/actions/workflows/run-tests.yml/badge.svg?branch=main)
![tests passing status](https://github.com/vjeranc/cmus-status-scrobbler/actions/workflows/ci.yml/badge.svg?branch=main)

Works with [cmus](https://cmus.github.io/). Requires Python 3 and has no
Works with [cmus](https://cmus.github.io/). Requires Python 3.9+ and has no
additional dependencies.

**Features:**
Expand Down
Loading