Skip to content

Commit 1bffbd5

Browse files
committed
chore: use github actions for ci
1 parent 62ea2dd commit 1bffbd5

File tree

2 files changed

+71
-2
lines changed

2 files changed

+71
-2
lines changed

.github/workflows/test.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ${{ matrix.platform }}
13+
strategy:
14+
matrix:
15+
platform: [ ubuntu-latest, macos-latest, windows-latest ]
16+
python-version: [ '3.7', '3.8', '3.9' ]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- uses: ibnesayeed/setup-ipfs@master
25+
with:
26+
ipfs_version: 0.19.2
27+
28+
- name: install deps
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install tox-gh-actions
32+
33+
- name: tox
34+
run: tox
35+
env:
36+
PYTHON_VER: ${{ matrix.python-version }}
37+
PLATFORM: ${{ matrix.platform }}
38+
39+
check:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
toxenv: [ styleck, typeck, py3-httpx ]
44+
45+
steps:
46+
- uses: actions/checkout@v3
47+
- uses: actions/setup-python@v4
48+
with:
49+
python-version: '3.9'
50+
51+
- name: install deps
52+
run: |
53+
python -m pip install --upgrade pip
54+
python -m pip install tox tox-gh-actions
55+
56+
- name: tox
57+
run: tox
58+
env:
59+
TOXENV: ${{ matrix.toxenv }}

tox.ini

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[tox]
33
minversion = 3.3
44
envlist =
5-
py3,
5+
py{37,38,39}-{linux,macos,windows},
66
py3-httpx,
77
styleck,
88
typeck
@@ -24,7 +24,7 @@ deps =
2424
py-cid
2525

2626
whitelist_externals = ipfs
27-
passenv = IPFS_* PY_IPFS_HTTP_CLIENT_*
27+
passenv = IPFS_*,PY_IPFS_HTTP_CLIENT_*
2828
commands =
2929
python -X utf8 "{toxinidir}/test/run-tests.py" {posargs}
3030

@@ -155,3 +155,13 @@ testpaths =
155155
ipfshttpclient
156156
test/unit
157157
test/functional
158+
159+
[gh-actions:env]
160+
PYTHON_VER =
161+
3.7: py37
162+
3.8: py38
163+
3.9: py39
164+
PLATFORM =
165+
ubuntu-latest: linux
166+
macos-latest: macos
167+
windows-latest: windows

0 commit comments

Comments
 (0)