Skip to content

Commit

Permalink
chore: use github actions for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kasteph committed May 16, 2023
1 parent 62ea2dd commit 1bffbd5
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: test

on:
push:
branches:
- main

pull_request:

jobs:
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.7', '3.8', '3.9' ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: ibnesayeed/setup-ipfs@master
with:
ipfs_version: 0.19.2

- name: install deps
run: |
python -m pip install --upgrade pip
python -m pip install tox-gh-actions
- name: tox
run: tox
env:
PYTHON_VER: ${{ matrix.python-version }}
PLATFORM: ${{ matrix.platform }}

check:
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [ styleck, typeck, py3-httpx ]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: install deps
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: tox
run: tox
env:
TOXENV: ${{ matrix.toxenv }}
14 changes: 12 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[tox]
minversion = 3.3
envlist =
py3,
py{37,38,39}-{linux,macos,windows},
py3-httpx,
styleck,
typeck
Expand All @@ -24,7 +24,7 @@ deps =
py-cid

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

Expand Down Expand Up @@ -155,3 +155,13 @@ testpaths =
ipfshttpclient
test/unit
test/functional

[gh-actions:env]
PYTHON_VER =
3.7: py37
3.8: py38
3.9: py39
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
windows-latest: windows

0 comments on commit 1bffbd5

Please sign in to comment.