try coveralls again
This commit is contained in:
parent
c01dceebcd
commit
0e9184048c
1 changed files with 85 additions and 69 deletions
154
.github/workflows/main.yml
vendored
154
.github/workflows/main.yml
vendored
|
@ -2,99 +2,115 @@ name: ci
|
||||||
on: push
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
lint:
|
# lint:
|
||||||
name: lint
|
# name: lint
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '3.7'
|
|
||||||
- name: extract pip cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
|
||||||
restore-keys: ${{ runner.os }}-pip-
|
|
||||||
- run: |
|
|
||||||
pip install --user --upgrade pip wheel
|
|
||||||
pip install -e .[lint]
|
|
||||||
- run: make lint
|
|
||||||
|
|
||||||
# tests-unit:
|
|
||||||
# name: "tests / unit"
|
|
||||||
# strategy:
|
|
||||||
# matrix:
|
|
||||||
# os:
|
|
||||||
# - ubuntu-latest
|
|
||||||
# - macos-latest
|
|
||||||
# - windows-latest
|
|
||||||
# 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
|
|
||||||
# id: pip-cache
|
|
||||||
# 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: ~/.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 .[test]
|
# pip install -e .[lint]
|
||||||
# - env:
|
# - run: make lint
|
||||||
# HOME: /tmp
|
|
||||||
# run: coverage run -m unittest -vv tests.unit.test_conf
|
|
||||||
## run: coverage run -m unittest discover -vv tests.unit
|
|
||||||
# - if: startsWith(runner.os, 'linux') || startsWith(runner.os, 'mac')
|
|
||||||
# run: bash <(curl -s https://codecov.io/bash) -X gcov -F unit,${{ runner.os }}
|
|
||||||
|
|
||||||
tests-integration:
|
tests-unit:
|
||||||
name: "tests / integration"
|
name: "tests / unit"
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
test:
|
os:
|
||||||
# - datanetwork
|
- ubuntu-latest
|
||||||
- blockchain
|
- macos-latest
|
||||||
# - other
|
- windows-latest
|
||||||
db:
|
runs-on: ${{ matrix.os }}
|
||||||
- sqlite
|
|
||||||
# - postgres
|
|
||||||
# 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:
|
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'
|
- name: set pip cache dir
|
||||||
run: |
|
id: pip-cache
|
||||||
sudo apt-get update
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
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: ${{ steps.pip-cache.outputs.dir }}
|
||||||
key: tox-integration-${{ matrix.test }}-${{ matrix.db }}-${{ hashFiles('setup.py') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
|
||||||
restore-keys: txo-integration-${{ matrix.test }}-${{ matrix.db }}-
|
restore-keys: ${{ runner.os }}-pip-
|
||||||
- run: pip install tox
|
- run: |
|
||||||
|
pip install --user --upgrade pip wheel
|
||||||
|
pip install -e .[test]
|
||||||
- env:
|
- env:
|
||||||
TEST_DB: ${{ matrix.db }}
|
HOME: /tmp
|
||||||
run: tox -e ${{ matrix.test }}
|
run: coverage run -m unittest -vv tests.unit.test_conf
|
||||||
|
# run: coverage run -m unittest discover -vv tests.unit
|
||||||
|
- if: startsWith(runner.os, 'linux') || startsWith(runner.os, 'mac')
|
||||||
|
env:
|
||||||
|
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COVERALLS_PARALLEL: true
|
||||||
|
name: Submit to coveralls
|
||||||
|
run: |
|
||||||
|
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
||||||
|
coveralls
|
||||||
|
|
||||||
|
complete_coverals:
|
||||||
|
needs: test-unit
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Coveralls Finished
|
||||||
|
uses: coverallsapp/github-action@master
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
parallel-finished: true
|
||||||
|
|
||||||
|
# tests-integration:
|
||||||
|
# name: "tests / integration"
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# test:
|
||||||
|
## - datanetwork
|
||||||
|
# - blockchain
|
||||||
|
## - other
|
||||||
|
# db:
|
||||||
|
# - sqlite
|
||||||
|
## - postgres
|
||||||
|
## 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
|
||||||
|
# - name: extract pip cache
|
||||||
|
# uses: actions/cache@v2
|
||||||
|
# with:
|
||||||
|
# path: ./.tox
|
||||||
|
# key: tox-integration-${{ matrix.test }}-${{ matrix.db }}-${{ hashFiles('setup.py') }}
|
||||||
|
# restore-keys: txo-integration-${{ matrix.test }}-${{ matrix.db }}-
|
||||||
|
# - run: pip install tox
|
||||||
|
# - env:
|
||||||
|
# TEST_DB: ${{ matrix.db }}
|
||||||
|
# run: tox -e ${{ matrix.test }}
|
||||||
|
|
||||||
# build:
|
# build:
|
||||||
# needs: ["lint", "tests-unit", "tests-integration"]
|
# needs: ["lint", "tests-unit", "tests-integration"]
|
||||||
|
|
Loading…
Reference in a new issue