-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Replace Travis CI by GitHub Actions (#56)
* 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
Showing
3 changed files
with
63 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
``` |