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

80 lines
2.1 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'
- run: make install tools
- run: make lint
tests-unit:
name: "tests / unit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
- run: make install tools
- working-directory: lbry
env:
HOME: /tmp
run: coverage run -p --source=lbry -m unittest discover -vv tests.unit
2019-12-12 14:03:38 -05:00
tests-integration:
name: "tests / integration"
2020-02-09 14:52:40 -05:00
runs-on: ubuntu-latest
2019-12-12 14:03:38 -05:00
strategy:
matrix:
test:
- datanetwork
- blockchain
- other
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
2020-02-09 14:52:40 -05:00
- if: matrix.test == 'other'
2019-12-12 14:03:38 -05:00
run: sudo apt install -y --no-install-recommends ffmpeg
- run: pip install tox-travis
- run: tox -e ${{ matrix.test }}
build:
2020-02-09 16:34:04 -05:00
needs: ["lint", "tests-unit", "tests-integration"]
2019-12-12 14:03:38 -05:00
name: "build"
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'
- 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
2020-02-09 14:52:40 -05:00
pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico --onefile --name lbrynet lbry/extras/cli.py
2019-12-12 14:03:38 -05:00
dist/lbrynet.exe --version