Skip to content

Commit

Permalink
ci: Replace Travis CI by GitHub Actions (#56)
Browse files Browse the repository at this point in the history
* ci: Test GitHub Actions

* ci: Add publication to pypi

* chore: lint README

* chore: Delete old travis CI file

* docs: Add github actions badge to README
  • Loading branch information
pnu-s authored Aug 17, 2021
1 parent a60e3be commit aa9f8db
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 51 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: CI

on:
push:
branches:
- v1
tags:
- v*
pull_request:
branches:
- v1
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8
- name: Run tests
run: |
export PATH="$PATH:$PWD/exodus_core/dexdump/"
python -m unittest discover -v -s exodus_core -p "test_*.py"
python setup.py sdist
- name: Publish package to pypi on tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,76 @@
# εxodus core
[![Build Status](https://travis-ci.org/Exodus-Privacy/exodus-core.svg?branch=v1)](https://travis-ci.org/Exodus-Privacy/exodus-core) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Exodus-Privacy/exodus-core.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Exodus-Privacy/exodus-core/context:python)

[![Build Status](https://github.com/Exodus-Privacy/exodus-core/actions/workflows/main.yml/badge.svg?branch=v1)](https://github.com/Exodus-Privacy/exodus-core/actions/workflows/main.yml) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Exodus-Privacy/exodus-core.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Exodus-Privacy/exodus-core/context:python)

Contains:

* Static analysis
* Network analysis
* Connection helper

## Installation

exodus-core is available from [PyPI](https://pypi.org/project/exodus-core):
```

```shell
pip install exodus-core
```

## Include it to your project

Add the following line in your `requirements.txt` (replace 'XX' by the desired subversion):
```

```text
exodus-core==XX
```

## Local usage

Clone this repository:
```

```shell
git clone https://github.com/Exodus-Privacy/exodus-core.git
cd exodus-core
```

### Using Docker

Build the Docker image:
```

```shell
docker build -t exodus-core .
```

Run tests:
```

```shell
docker run -it --rm exodus-core /bin/bash
python -m unittest discover -s exodus_core -p "test_*.py"
```

### Manual installation

Install `dexdump`:
```

```shell
sudo apt-get install dexdump
```

Create Python `virtualenv`:
```

```shell
virtualenv venv -p python3
source venv/bin/activate
```

Install dependencies:
```

```shell
pip install -r requirements.txt
```

Run tests:
```

```shell
python -m unittest discover -s exodus_core -p "test_*.py"
```

0 comments on commit aa9f8db

Please sign in to comment.