Skip to content

Commit f9d7bcb

Browse files
committed
Move away from tox and to GitHub Actions
1 parent a8bc031 commit f9d7bcb

File tree

4 files changed

+52
-37
lines changed

4 files changed

+52
-37
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version: [3.6, 3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: "Set up Python"
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: "Install dependencies"
28+
run: |
29+
python -m pip install --upgrade --editable .[dev]
30+
pip install flake8
31+
32+
- name: "Lint"
33+
run: |
34+
flake8 *.py pip_check_reqs tests
35+
pip-extra-reqs pip_check_reqs
36+
pip-missing-reqs pip_check_reqs
37+
38+
- name: "Run tests"
39+
run: |
40+
pytest -s -vvv --cov-fail-under 100 --cov=pip_check_reqs/ --cov=tests tests/ --cov-report=xml
41+
42+
- name: "Upload coverage to Codecov"
43+
uses: "codecov/codecov-action@v1"
44+
with:
45+
fail_ci_if_error: true

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from codecs import open
33
from os import path
44

5+
from pip_check_reqs import __version__
6+
57
here = path.abspath(path.dirname(__file__))
68

79
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
@@ -15,14 +17,13 @@
1517
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
1618
requirements = [s.strip() for s in f.readlines()]
1719

18-
from pip_check_reqs import __version__
19-
2020
setup(
2121
name='pip_check_reqs',
2222
version=__version__,
23-
description=
23+
description=(
2424
'Find packages that should or should not be in requirements for a '
25-
'project',
25+
'project'
26+
),
2627
long_description=long_description,
2728
url='https://github.com/r1chardj0n3s/pip-check-reqs',
2829
author='Richard Jones',

test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
coverage
21
pretend
3-
pytest
2+
pytest
3+
pytest-cov

tox.ini

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)