forked from LBRYCommunity/lbry-sdk
github actions
This commit is contained in:
parent
a042377a7b
commit
8799caa0e4
1 changed files with 94 additions and 62 deletions
156
.github/workflows/main.yml
vendored
156
.github/workflows/main.yml
vendored
|
@ -1,38 +1,51 @@
|
||||||
name: ci
|
name: ci
|
||||||
on: pull_request
|
#on: pull_request
|
||||||
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
lint:
|
# lint:
|
||||||
name: lint
|
# name: lint
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v1
|
# - uses: actions/checkout@v1
|
||||||
- uses: actions/setup-python@v1
|
# - uses: actions/setup-python@v1
|
||||||
with:
|
# with:
|
||||||
python-version: '3.7'
|
# python-version: '3.7'
|
||||||
- run: pip install -e .[lint]
|
# - run: pip install -e .[lint]
|
||||||
- run: make lint
|
# - run: make lint
|
||||||
|
|
||||||
tests-unit:
|
# tests-unit:
|
||||||
name: "tests / unit"
|
# name: "tests / unit"
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
os:
|
# os:
|
||||||
- ubuntu-latest
|
# - ubuntu-latest
|
||||||
- macos-latest
|
# - macos-latest
|
||||||
- windows-latest
|
# - windows-latest
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v1
|
# - uses: actions/checkout@v1
|
||||||
- uses: actions/setup-python@v1
|
# - uses: actions/setup-python@v1
|
||||||
with:
|
# with:
|
||||||
python-version: '3.7'
|
# python-version: '3.7'
|
||||||
- run: pip install -e .[test]
|
# - name: set pip cache dir
|
||||||
- working-directory: lbry
|
# id: pip-cache
|
||||||
env:
|
# run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
HOME: /tmp
|
# - name: extract pip cache
|
||||||
run: coverage run -p --source=lbry -m unittest -vv tests.unit.test_conf
|
# uses: actions/cache@v2
|
||||||
#run: coverage run -p --source=lbry -m unittest discover -vv tests.unit
|
# with:
|
||||||
|
# path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
|
# key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
|
# restore-keys: ${{ runner.os }}-pip-
|
||||||
|
# - run: |
|
||||||
|
# pip install --user --upgrade pip wheel
|
||||||
|
# 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:
|
# tests-integration:
|
||||||
# name: "tests / integration"
|
# name: "tests / integration"
|
||||||
|
@ -70,34 +83,53 @@ jobs:
|
||||||
# TEST_DB: ${{ matrix.db }}
|
# TEST_DB: ${{ matrix.db }}
|
||||||
# run: tox -e ${{ matrix.test }}
|
# run: tox -e ${{ matrix.test }}
|
||||||
#
|
#
|
||||||
# build:
|
build:
|
||||||
# needs: ["lint", "tests-unit", "tests-integration"]
|
#needs: ["lint", "tests-unit", "tests-integration"]
|
||||||
# name: "build"
|
#needs: ["tests-unit"]
|
||||||
# strategy:
|
name: "build"
|
||||||
# matrix:
|
strategy:
|
||||||
# os:
|
matrix:
|
||||||
# - ubuntu-latest
|
os:
|
||||||
# - macos-latest
|
- ubuntu-16.04
|
||||||
# - windows-latest
|
- macos-latest
|
||||||
# runs-on: ${{ matrix.os }}
|
- windows-latest
|
||||||
# steps:
|
runs-on: ${{ matrix.os }}
|
||||||
# - uses: actions/checkout@v1
|
steps:
|
||||||
# - uses: actions/setup-python@v1
|
- uses: actions/checkout@v1
|
||||||
# with:
|
- uses: actions/setup-python@v1
|
||||||
# python-version: '3.7'
|
with:
|
||||||
# - name: Setup
|
python-version: '3.7'
|
||||||
# run: |
|
- name: set pip cache dir
|
||||||
# pip install pyinstaller
|
id: pip-cache
|
||||||
# pip install -e .
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
# - if: startsWith(matrix.os, 'windows') == false
|
- name: extract pip cache
|
||||||
# name: Build & Run (Unix)
|
uses: actions/cache@v2
|
||||||
# run: |
|
with:
|
||||||
# pyinstaller --onefile --name lbrynet lbry/extras/cli.py
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
# chmod +x dist/lbrynet
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
# dist/lbrynet --version
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
# - if: startsWith(matrix.os, 'windows')
|
- if: startsWith(runner.os, 'linux')
|
||||||
# name: Build & Run (Windows)
|
run: sudo apt-get install libzmq3-dev
|
||||||
# run: |
|
- if: startsWith(runner.os, 'mac')
|
||||||
# pip install pywin32
|
run: brew install zeromq
|
||||||
# pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico --onefile --name lbrynet lbry/extras/cli.py
|
- name: Setup
|
||||||
# dist/lbrynet.exe --version
|
run: |
|
||||||
|
pip install --user --upgrade pip wheel
|
||||||
|
pip install sqlalchemy@git+https://github.com/eukreign/pyinstaller.git@sqlalchemy
|
||||||
|
pip install -e .
|
||||||
|
- if: startsWith(runner.os, 'linux') || startsWith(runner.os, 'mac')
|
||||||
|
name: Build & Run (Unix)
|
||||||
|
run: |
|
||||||
|
pyinstaller --onefile --name lbrynet lbry/cli.py
|
||||||
|
chmod +x dist/lbrynet
|
||||||
|
dist/lbrynet --version
|
||||||
|
- if: startsWith(runner.os, 'windows')
|
||||||
|
name: Build & Run (Windows)
|
||||||
|
run: |
|
||||||
|
pip install pywin32
|
||||||
|
pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico --onefile --name lbrynet lbry/cli.py
|
||||||
|
dist/lbrynet.exe --version
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ runner.os }}
|
||||||
|
path: dist/
|
||||||
|
|
Loading…
Reference in a new issue