4 changed files with 54 additions and 99 deletions
@ -1,30 +0,0 @@
|
||||
name: Python package |
||||
|
||||
on: [push] |
||||
|
||||
jobs: |
||||
build: |
||||
|
||||
runs-on: ubuntu-latest |
||||
strategy: |
||||
matrix: |
||||
python-version: [3.6, 3.7, 3.8, 3.9] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: Set up Python ${{ matrix.python-version }} |
||||
uses: actions/setup-python@v2 |
||||
with: |
||||
python-version: ${{ matrix.python-version }} |
||||
- name: Install dependencies |
||||
run: | |
||||
python -m pip install --upgrade pip |
||||
pip install -r requirements/base.txt |
||||
pip install -r requirements/testing.txt |
||||
- name: Lint with flake8 |
||||
run: | |
||||
flake8 -v jmclient jmbase jmbitcoin jmdaemon scripts |
||||
#- name: Test with pytest |
||||
#run: | |
||||
#pytest |
||||
|
||||
@ -0,0 +1,54 @@
|
||||
name: Python package |
||||
|
||||
on: [push, pull_request] |
||||
|
||||
jobs: |
||||
build: |
||||
|
||||
runs-on: ubuntu-latest |
||||
strategy: |
||||
matrix: |
||||
python-version: [3.6, 3.7, 3.8, 3.9] |
||||
|
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
- name: Set up Python ${{ matrix.python-version }} |
||||
uses: actions/setup-python@v2 |
||||
with: |
||||
python-version: ${{ matrix.python-version }} |
||||
- name: Cache venv |
||||
id: cache-venv |
||||
uses: actions/cache@v2 |
||||
env: |
||||
cache-name: venv |
||||
with: |
||||
path: jmvenv |
||||
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ env.cache-name }}-${{ hashFiles('requirements/*.txt', 'install.sh', '*/setup.py') }} |
||||
- name: Setup joinmarket + virtualenv |
||||
if: steps.cache-venv.outputs.cache-hit != 'true' |
||||
run: | |
||||
sudo apt update |
||||
./install.sh --develop --with-qt |
||||
./jmvenv/bin/python -m pip install --upgrade pip |
||||
./jmvenv/bin/pip install -r requirements/base.txt |
||||
./jmvenv/bin/pip install -r requirements/testing.txt |
||||
- name: Lint with flake8 |
||||
run: ./jmvenv/bin/flake8 -v jmclient jmbase jmbitcoin jmdaemon scripts |
||||
- name: Cache bitcoind |
||||
uses: actions/cache@v2 |
||||
env: |
||||
cache-name: bitcoind |
||||
with: |
||||
path: ~/bitcoin/*/bin/bitcoin* |
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('test/testrunner/install_bitcoind.sh') }} |
||||
- name: Install bitcoind |
||||
run: ./test/testrunner/install_bitcoind.sh |
||||
- name: Cache miniircd |
||||
uses: actions/cache@v2 |
||||
env: |
||||
cache-name: miniircd |
||||
with: |
||||
path: miniircd/miniircd |
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('test/run_tests.sh') }} |
||||
- name: Run tests |
||||
run: source ./jmvenv/bin/activate && ./test/run_tests.sh |
||||
@ -1,69 +0,0 @@
|
||||
sudo: required |
||||
dist: xenial |
||||
matrix: |
||||
include: |
||||
- os: osx |
||||
env: PIP_DOWNLOAD_CACHE=$HOME/Library/Caches/pip |
||||
addons: |
||||
homebrew: |
||||
packages: |
||||
- bitcoin |
||||
- libsodium |
||||
update: true |
||||
- os: linux |
||||
env: PIP_DOWNLOAD_CACHE=$HOME/.cache/pip |
||||
addons: |
||||
apt: |
||||
packages: |
||||
- python3-dev |
||||
- python3-pip |
||||
- virtualenv |
||||
- libsodium18 |
||||
- os: linux |
||||
services: docker |
||||
env: DOCKER_IMG_JM=xenial-py3 |
||||
- os: linux |
||||
services: docker |
||||
env: DOCKER_IMG_JM=bionic-py3 |
||||
- os: linux |
||||
services: docker |
||||
env: DOCKER_IMG_JM=stretch-py3 |
||||
- os: linux |
||||
services: docker |
||||
env: DOCKER_IMG_JM=centos7-py3 |
||||
- os: linux |
||||
services: docker |
||||
env: DOCKER_IMG_JM=fedora27-py3 |
||||
before_install: |
||||
- do_on(){ if [ "$TRAVIS_OS_NAME" = "$1" ]; then shift; "$@" ; fi; } |
||||
- on_host(){ if [ -z "$DOCKER_IMG_JM" ]; then "$@" ; fi; } |
||||
- should_run_dockers(){ if [ "$TRAVIS_EVENT_TYPE" = cron ] || [ -n "$TRAVIS_TAG" ] || echo "${TRAVIS_COMMIT_MESSAGE[@]}" | grep -q "TRAVIS_RUN_DOCKERS"; then return 0; else return 1; fi; } |
||||
- on_docker(){ if [ -n "$DOCKER_IMG_JM" ]; then "$@" ; fi; } |
||||
- do_on osx pip install virtualenv |
||||
cache: |
||||
directories: |
||||
- $HOME/bitcoin/bitcoin-0.19.1/bin |
||||
- $HOME/downloads |
||||
- $HOME/.cache/pip |
||||
- $HOME/Library/Caches/pip |
||||
- $HOME/Library/Caches/Homebrew |
||||
before_cache: |
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi |
||||
install: |
||||
- mkdir -p "$HOME/downloads" |
||||
- mkdir -p "$TRAVIS_BUILD_DIR/deps/cache/" |
||||
- find "$HOME/downloads" -type f -exec cp -v {} "$TRAVIS_BUILD_DIR/deps/cache/" \; |
||||
- on_host do_on linux ./test/travis/install_bitcoind.sh |
||||
- on_host do_on linux ./install.sh --develop --with-qt |
||||
- on_host do_on osx virtualenv --python=python3 jmvenv |
||||
- on_host find "$TRAVIS_BUILD_DIR/deps/cache/" -type f -exec cp -v {} "$HOME/downloads/" \; |
||||
before_script: |
||||
- on_host source jmvenv/bin/activate |
||||
script: |
||||
- on_host bitcoind --help | head -1 |
||||
- on_host ./test/run_tests.sh |
||||
- on_host do_on linux flake8 jmbase jmbitcoin jmclient jmdaemon scripts test |
||||
- on_docker ./test/Dockerfiles/build_docker.sh |
||||
after_success: |
||||
- on_docker echo "Success !" |
||||
- on_host coveralls |
||||
Loading…
Reference in new issue