Skip to content

Commit b2efc72

Browse files
authored
Merge pull request #329 from nschloe/gh-actions
add gh-actions config
2 parents 5271531 + bbb5833 commit b2efc72

File tree

5 files changed

+51
-4
lines changed

5 files changed

+51
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- run: apt install -y python3-pip
1111
- run: pip3 install -U black flake8
1212
- run: LC_ALL=C.UTF-8 black --check .
13-
- run: flake8 setup.py tikzplotlib/ test/*.py
13+
- run: flake8 .
1414
build:
1515
working_directory: ~/work
1616
docker:

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: test
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/setup-python@v1
10+
with:
11+
python-version: "3.x"
12+
- uses: actions/checkout@v1
13+
- name: Lint with flake8
14+
run: |
15+
pip install --upgrade pip
16+
pip install flake8
17+
flake8 .
18+
- name: Lint with black
19+
run: |
20+
pip install black
21+
black --check .
22+
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/setup-python@v1
27+
with:
28+
python-version: "3.x"
29+
- uses: actions/checkout@v1
30+
- name: Install dependencies
31+
run: sudo apt-get install -y texlive-latex-base texlive-latex-extra python3-tk python3-scipy
32+
- name: Install package
33+
run: |
34+
pip install --upgrade pip
35+
pip install .
36+
- name: Extract tests from README
37+
run: |
38+
pip install excode
39+
excode README.md test/zzz_readme_test.py --filter python,test
40+
- name: Test with pytest
41+
run: |
42+
pip install pytest pytest-cov
43+
pip install -r test_requirements.txt
44+
cd test/ && MPLBACKEND=Agg pytest --cov tikzplotlib
45+
- name: Submit to codecov
46+
run: bash <(curl -s https://codecov.io/bash) -R ~/work/tikzplotlib

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ black:
3232

3333
lint:
3434
black --check .
35-
flake8 setup.py tikzplotlib/ test/*.py
35+
flake8 .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
[![CircleCI](https://img.shields.io/circleci/project/github/nschloe/tikzplotlib/master.svg?style=flat-square)](https://circleci.com/gh/nschloe/tikzplotlib/tree/master)
66
[![codecov](https://img.shields.io/codecov/c/github/nschloe/tikzplotlib.svg?style=flat-square)](https://codecov.io/gh/nschloe/tikzplotlib)
7-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)
7+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
88
[![Documentation Status](https://readthedocs.org/projects/tikzplotlib/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/tikzplotlib/?badge=latest)
99
[![awesome](https://img.shields.io/badge/awesome-yes-brightgreen.svg?style=flat-square)](https://github.com/nschloe/tikzplotlib)
1010
[![PyPi Version](https://img.shields.io/pypi/v/tikzplotlib.svg?style=flat-square)](https://pypi.org/project/tikzplotlib)
1111
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1173089.svg?style=flat-square)](https://doi.org/10.5281/zenodo.1173089)
1212
[![GitHub stars](https://img.shields.io/github/stars/nschloe/tikzplotlib.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/tikzplotlib)
13-
[![PyPi downloads](https://img.shields.io/pypi/dd/tikzplotlib.svg?style=flat-square)](https://pypistats.org/packages/tikzplotlib)
13+
[![PyPi downloads](https://img.shields.io/pypi/dm/tikzplotlib.svg?style=flat-square)](https://pypistats.org/packages/tikzplotlib)
1414

1515
This is tikzplotlib, a Python tool for converting matplotlib figures into
1616
[PGFPlots](https://www.ctan.org/pkg/pgfplots) ([PGF/TikZ](https://www.ctan.org/pkg/pgf))

test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pandas
2+
scipy

0 commit comments

Comments
 (0)