Skip to content

Commit 19561f0

Browse files
committed
Remove setup.py, use poetry github workflows.
1 parent fa1f8fc commit 19561f0

File tree

4 files changed

+31
-88
lines changed

4 files changed

+31
-88
lines changed
Lines changed: 27 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,38 @@
11
name: python-slip10
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: [push, pull_request]
84

95
jobs:
10-
tests:
6+
test:
7+
runs-on: ${{ matrix.os }}
118
strategy:
129
matrix:
13-
python-version: ['3.9', '3.10']
14-
os:
15-
- ubuntu-latest
16-
- macOS-latest
17-
- windows-latest
18-
19-
runs-on: ${{ matrix.os }}
10+
os: [ ubuntu-latest ]
11+
python-version: ['3.8', '3.9', '3.10']
2012
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Installation (deps and package)
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install pytest
30-
pip install -r requirements.txt -r tests/requirements.txt
31-
python setup.py install
32-
- name: Test with pytest
33-
run: |
34-
pytest -vvv
13+
- uses: actions/checkout@v4
14+
- name: Install poetry
15+
run: pipx install poetry
16+
- name: Setup python for ${{ matrix.python-version }}
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: poetry install
22+
- name: Run tests for Python-${{ matrix.python-version }} with ${{ matrix.os }}
23+
run: poetry run pytest
3524

3625
linter:
3726
runs-on: ubuntu-latest
3827
steps:
39-
- uses: actions/checkout@v2
40-
- name: Set up Python 3.9
41-
uses: actions/setup-python@v2
42-
with:
43-
python-version: 3.9
44-
- name: Run `black` on the source code
45-
run: |
46-
python -m pip install --upgrade pip
47-
pip install black
48-
python -m black --check slip10 tests
49-
50-
coincurve_versions:
51-
strategy:
52-
matrix:
53-
coincurve-version: [15, 16, 17]
54-
55-
runs-on: ubuntu-latest
56-
steps:
57-
- uses: actions/checkout@v2
58-
- name: Set up Python 3.10
59-
uses: actions/setup-python@v2
60-
with:
61-
python-version: '3.10'
62-
- name: Testing with Coincurve ${{ matrix.coincurve-version }}
63-
run: |
64-
python -m pip install --upgrade pip
65-
pip install pytest
66-
pip install -r requirements.txt -r tests/requirements.txt
67-
pip install -I coincurve==${{ matrix.coincurve-version }}
68-
python setup.py install
28+
- uses: actions/checkout@v4
29+
- name: Install poetry
30+
run: pipx install poetry
31+
- name: Setup python for ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: 3.9
35+
- name: Install dependencies
36+
run: poetry install --only=dev
37+
- name: Run style check
38+
run: poetry run make style_check

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ test:
3333
pytest
3434

3535
style_check:
36-
isort --check-only slip10/ tests/ *.py
37-
black slip10/ tests/ *.py --check
36+
isort --check-only slip10/ tests/
37+
black slip10/ tests/ --check
3838

3939
style:
40-
isort slip10/ tests/ *.py
41-
black slip10/ tests/ *.py
40+
isort slip10/ tests/
41+
black slip10/ tests/
4242

4343

4444
.PHONY: clean clean-build clean-pyc clean-test test style_check style

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

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

0 commit comments

Comments
 (0)