Skip to content

Commit 578b01f

Browse files
authored
Merge pull request #72 from keis/update-github-actions
Update GitHub actions
2 parents 3baac10 + 6b982ac commit 578b01f

File tree

4 files changed

+47
-14
lines changed

4 files changed

+47
-14
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ jobs:
66
name: Publish package
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010

1111
- name: Set up Python
12-
uses: actions/setup-python@v2
12+
uses: actions/setup-python@v4
1313
with:
14-
python-version: '3.9'
14+
python-version: '3.11'
1515

1616
- name: Install pypa/build
1717
run: |

.github/workflows/test.yaml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,65 @@ on: [push, pull_request]
44

55
jobs:
66
test:
7-
name: Run tests
7+
name: Unit Tests
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
1111
python-version:
12-
- '3.6'
1312
- '3.7'
1413
- '3.8'
1514
- '3.9'
1615
- '3.10'
16+
- '3.11'
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

2525
- name: Install dependencies
2626
run: |
2727
pip install '.[tests]'
2828
29+
- name: Run tests
30+
run: |
31+
pytest --cov=base58 --benchmark-disable .
32+
33+
mypy:
34+
name: MyPy
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v3
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: 3.11
43+
44+
- name: Install dependencies
45+
run: |
46+
pip install '.[tests]'
47+
2948
- name: Run MyPy
3049
run: |
3150
mypy . --exclude build
3251
33-
- name: Run tests
52+
flake8:
53+
name: flake8
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
58+
- name: Set up Python
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: 3.11
62+
63+
- name: Install dependencies
3464
run: |
35-
pytest --flake8 --cov=base58 --benchmark-disable .
65+
pip install '.[tests]'
66+
67+
- name: Run flake8
68+
uses: py-actions/flake8@v2

base58/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
from base58 import b58decode, b58decode_check, b58encode, b58encode_check
88

9-
_fmap = {
9+
_fmap: Dict[Tuple[bool, bool], Callable[[bytes], bytes]] = {
1010
(False, False): b58encode,
1111
(False, True): b58encode_check,
1212
(True, False): b58decode,
1313
(True, True): b58decode_check
14-
} # type: Dict[Tuple[bool, bool], Callable[[bytes], bytes]]
14+
}
1515

1616

1717
def main() -> None:
@@ -47,7 +47,7 @@ def main() -> None:
4747
try:
4848
result = fun(data)
4949
except Exception as e:
50-
sys.exit(e)
50+
sys.exit(str(e))
5151

5252
stdout.write(result)
5353

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers =
2121
[options]
2222
packages = base58
2323
zip_safe = False
24-
python_requires = >=3.5
24+
python_requires = >=3.7
2525

2626
[options.entry_points]
2727
console_scripts =
@@ -32,12 +32,12 @@ base58 = py.typed
3232

3333
[options.extras_require]
3434
tests =
35+
flake8
3536
mypy
3637
PyHamcrest>=2.0.2
3738
pytest>=4.6
3839
pytest-benchmark
3940
pytest-cov
40-
pytest-flake8
4141

4242
[bumpversion:file:setup.cfg]
4343

0 commit comments

Comments
 (0)