Skip to content

Commit

Permalink
Merge pull request #93 from nschloe/main-update
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Jan 19, 2021
2 parents 196b83b + 2f7161c commit 3c8a13b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 20 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: ci

on: [pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- uses: actions/checkout@v2
Expand All @@ -23,20 +29,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- name: Install dependencies
- name: Install system dependencies
run: sudo apt-get install -y stress
- name: Install package
run: pip install .
- name: Test with pytest
- name: Test with tox
run: |
pip install pytest pytest-cov
cd test/ && MPLBACKEND=Agg pytest --cov stressberry
- name: Submit to codecov
pip install tox
tox
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.8' }}
run: bash <(curl -s https://codecov.io/bash)
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ default:
@echo "\"make publish\"?"

tag:
# Make sure we're on the master branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
# Make sure we're on the main branch
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
# @echo "Tagging v$(VERSION)..."
# git tag v$(VERSION)
# git push --tags
curl -H "Authorization: token `cat $(HOME)/.github-access-token`" -d '{"tag_name": "v$(VERSION)"}' https://api.github.com/repos/nschloe/stressberry/releases

upload:
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
rm -f dist/*
# python3 setup.py sdist bdist_wheel
# https://stackoverflow.com/a/58756491/353337
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<p align="center">Stress tests and temperature plots for the Raspberry Pi</p>
</p>

[![CircleCI](https://img.shields.io/circleci/project/github/nschloe/stressberry/master.svg?style=flat-square)](https://circleci.com/gh/nschloe/stressberry/tree/master)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/stressberry.svg?style=flat-square)](https://codecov.io/gh/nschloe/stressberry)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![awesome](https://img.shields.io/badge/awesome-yes-brightgreen.svg?style=flat-square)](https://github.com/nschloe/stressberry)
[![PyPi Version](https://img.shields.io/pypi/v/stressberry.svg?style=flat-square)](https://pypi.org/project/stressberry)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/stressberry.svg?style=flat-square)](https://pypi.org/pypi/stressberry/)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/stressberry.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/stressberry)
[![PyPi downloads](https://img.shields.io/pypi/dm/stressberry.svg?style=flat-square)](https://pypistats.org/packages/stressberry)

[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/stressberry/ci?style=flat-square)](https://github.com/nschloe/stressberry/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/stressberry.svg?style=flat-square)](https://codecov.io/gh/nschloe/stressberry)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

There are a million ways to cool down your Raspberry Pi: Small heat sinks, specific
cases, and some [extreme DIY solutions](https://youtu.be/WfQMLInuwws). stressberry is a
package for testing the core temperature under different loads, and it produces nice
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = stressberry
version = 0.3.2
version = 0.3.3
author = Nico Schlömer
author_email = nico.schloemer@gmail.com
description = Stress tests for the Raspberry Pi
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = py3
isolated_build = True

[testenv]
deps =
pytest
pytest-cov
extras = all
commands =
pytest --cov {envsitepackagesdir}/stressberry --cov-report xml --cov-report term

0 comments on commit 3c8a13b

Please sign in to comment.