forked from LBRYCommunity/lbry-sdk
re-enable all github workflows
This commit is contained in:
parent
a77b1f9997
commit
8fa2d746e7
2 changed files with 120 additions and 120 deletions
238
.github/workflows/main.yml
vendored
238
.github/workflows/main.yml
vendored
|
@ -2,132 +2,132 @@ name: ci
|
||||||
on: push
|
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'
|
||||||
# - name: extract pip cache
|
- name: extract pip cache
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
# key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
# restore-keys: ${{ runner.os }}-pip-
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
# - run: |
|
- run: |
|
||||||
# pip install --user --upgrade pip wheel
|
pip install --user --upgrade pip wheel
|
||||||
# pip install -e .[lint]
|
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'
|
||||||
# - name: set pip cache dir
|
- name: set pip cache dir
|
||||||
# id: pip-cache
|
id: pip-cache
|
||||||
# run: echo "::set-output name=dir::$(pip cache dir)"
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
# - name: extract pip cache
|
- name: extract pip cache
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: ${{ steps.pip-cache.outputs.dir }}
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
# key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
# restore-keys: ${{ runner.os }}-pip-
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
# - run: |
|
- run: |
|
||||||
# pip install --user --upgrade pip wheel
|
pip install --user --upgrade pip wheel
|
||||||
# pip install -e .[test]
|
pip install -e .[test]
|
||||||
# - env:
|
- env:
|
||||||
# HOME: /tmp
|
HOME: /tmp
|
||||||
# run: coverage run -m unittest -vv tests.unit.test_conf tests.unit.blockchain tests.unit.test_event_controller tests.unit.crypto tests.unit.schema tests.unit.db
|
run: coverage run -m unittest -vv tests.unit.test_conf tests.unit.blockchain tests.unit.test_event_controller tests.unit.crypto tests.unit.schema tests.unit.db
|
||||||
## run: coverage run -m unittest discover -vv tests.unit
|
# run: coverage run -m unittest discover -vv tests.unit
|
||||||
# - env:
|
- env:
|
||||||
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# COVERALLS_PARALLEL: true
|
COVERALLS_PARALLEL: true
|
||||||
# name: Submit to coveralls
|
name: Submit to coveralls
|
||||||
# run: |
|
run: |
|
||||||
# pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
||||||
# coveralls
|
coveralls
|
||||||
#
|
|
||||||
# tests-integration:
|
tests-integration:
|
||||||
# name: "tests / integration"
|
name: "tests / integration"
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# test:
|
test:
|
||||||
## - datanetwork
|
# - datanetwork
|
||||||
# - blockchain
|
- blockchain
|
||||||
## - other
|
# - other
|
||||||
# db:
|
db:
|
||||||
# - sqlite
|
- sqlite
|
||||||
# - postgres
|
- postgres
|
||||||
# services:
|
services:
|
||||||
# postgres:
|
postgres:
|
||||||
# image: postgres:12
|
image: postgres:12
|
||||||
# env:
|
env:
|
||||||
# POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
# POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
# POSTGRES_DB: postgres
|
POSTGRES_DB: postgres
|
||||||
# ports:
|
ports:
|
||||||
# - 5432:5432
|
- 5432:5432
|
||||||
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
# 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'
|
||||||
# - if: matrix.test == 'other'
|
- if: matrix.test == 'other'
|
||||||
# run: |
|
run: |
|
||||||
# sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install -y --no-install-recommends ffmpeg
|
sudo apt-get install -y --no-install-recommends ffmpeg
|
||||||
# - name: extract pip cache
|
- name: extract pip cache
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: ./.tox
|
path: ./.tox
|
||||||
# key: tox-integration-${{ matrix.test }}-${{ matrix.db }}-${{ hashFiles('setup.py') }}
|
key: tox-integration-${{ matrix.test }}-${{ matrix.db }}-${{ hashFiles('setup.py') }}
|
||||||
# restore-keys: txo-integration-${{ matrix.test }}-${{ matrix.db }}-
|
restore-keys: txo-integration-${{ matrix.test }}-${{ matrix.db }}-
|
||||||
# - run: pip install tox
|
- run: pip install tox
|
||||||
# - env:
|
- env:
|
||||||
# TEST_DB: ${{ matrix.db }}
|
TEST_DB: ${{ matrix.db }}
|
||||||
# run: tox -e ${{ matrix.test }}
|
run: tox -e ${{ matrix.test }}
|
||||||
# - env:
|
- env:
|
||||||
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# COVERALLS_PARALLEL: true
|
COVERALLS_PARALLEL: true
|
||||||
# name: Submit to coveralls
|
name: Submit to coveralls
|
||||||
# run: |
|
run: |
|
||||||
# pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
||||||
# coverage combine tests
|
coverage combine tests
|
||||||
# coveralls
|
coveralls
|
||||||
#
|
|
||||||
# coveralls-finished:
|
coveralls-finished:
|
||||||
# needs: ["tests-unit", "tests-integration"]
|
needs: ["tests-unit", "tests-integration"]
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - name: Coveralls Finished
|
- name: Coveralls Finished
|
||||||
# uses: coverallsapp/github-action@57daa114
|
uses: coverallsapp/github-action@57daa114
|
||||||
# with:
|
with:
|
||||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# parallel-finished: true
|
parallel-finished: true
|
||||||
|
|
||||||
build:
|
build:
|
||||||
#needs: ["lint", "tests-unit", "tests-integration"]
|
needs: ["lint", "tests-unit", "tests-integration"]
|
||||||
name: "build"
|
name: "build"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- ubuntu-16.04
|
- ubuntu-16.04
|
||||||
# - 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
|
||||||
|
|
|
@ -50,7 +50,7 @@ def disable_trigger_and_constraints(table_name):
|
||||||
ctx = context()
|
ctx = context()
|
||||||
if ctx.is_postgres:
|
if ctx.is_postgres:
|
||||||
ctx.execute(text(f"ALTER TABLE {table_name} DISABLE TRIGGER ALL;"))
|
ctx.execute(text(f"ALTER TABLE {table_name} DISABLE TRIGGER ALL;"))
|
||||||
if table_name == 'tag':
|
if table_name in ('tag', 'stake'):
|
||||||
return
|
return
|
||||||
if ctx.is_postgres:
|
if ctx.is_postgres:
|
||||||
ctx.execute(text(
|
ctx.execute(text(
|
||||||
|
|
Loading…
Reference in a new issue