lbry-sdk/.github/workflows/main.yml

104 lines
2.8 KiB
YAML
Raw Normal View History

2019-12-12 14:03:38 -05:00
name: ci
2020-02-09 14:52:40 -05:00
on: pull_request
2019-12-12 14:03:38 -05:00
jobs:
2020-02-09 14:52:40 -05:00
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
2020-06-03 19:43:08 -04:00
- run: pip install -e .[lint]
2020-02-09 14:52:40 -05:00
- run: make lint
tests-unit:
name: "tests / unit"
2019-12-12 14:03:38 -05:00
strategy:
matrix:
os:
2020-02-09 14:52:40 -05:00
- ubuntu-latest
2019-12-12 14:03:38 -05:00
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
2020-06-03 19:43:08 -04:00
- run: pip install -e .[test]
- working-directory: lbry
env:
HOME: /tmp
run: coverage run -p --source=lbry -m unittest -vv tests.unit.test_conf
#run: coverage run -p --source=lbry -m unittest discover -vv tests.unit
# tests-integration:
# name: "tests / integration"
# runs-on: ubuntu-latest
# strategy:
# matrix:
# test:
# - datanetwork
# - blockchain
# - other
# db:
# - postgres
# - sqlite
# services:
# postgres:
# image: postgres:12
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: postgres
# ports:
# - 5432:5432
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-python@v1
# with:
# python-version: '3.7'
# - if: matrix.test == 'other'
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends ffmpeg
# - run: pip install tox-travis
# - env:
# TEST_DB: ${{ matrix.db }}
# run: tox -e ${{ matrix.test }}
#
# build:
# needs: ["lint", "tests-unit", "tests-integration"]
# name: "build"
# strategy:
# matrix:
# os:
# - ubuntu-latest
# - macos-latest
# - windows-latest
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-python@v1
# with:
# python-version: '3.7'
# - name: Setup
# run: |
# pip install pyinstaller
# pip install -e .
# - if: startsWith(matrix.os, 'windows') == false
# name: Build & Run (Unix)
# run: |
# pyinstaller --onefile --name lbrynet lbry/extras/cli.py
# chmod +x dist/lbrynet
# dist/lbrynet --version
# - if: startsWith(matrix.os, 'windows')
# name: Build & Run (Windows)
# run: |
# pip install pywin32
# pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico --onefile --name lbrynet lbry/extras/cli.py
# dist/lbrynet.exe --version