Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Aug 30, 2019
1 parent 69f9002 commit e95a620
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import platform
import os

if platform.system() == 'Linux':
os.system('sudo apt-get install iputils-ping')

os.system('python -m pip install --upgrade pip')
os.system('pip install tox codecov coveralls pytest-cov')
os.system('pip install -r requirements.txt')
os.system('pip install -r requirements_dev.txt')



25 changes: 25 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Testing IPpy
on: [push]
jobs:
build:
strategy:
max-parallel: 4
matrix:
platform: [ubuntu-latest, macOS-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python .github/workflows/deps.py
- name: Test with pytest
run: python .github/workflows/test.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml
4 changes: 4 additions & 0 deletions .github/workflows/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import sys
import os
os.system('py.test --cov=ippy tests/')
os.system('tox -e py' + sys.version[:3].replace('.', ''))

0 comments on commit e95a620

Please sign in to comment.