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
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
name: lint
|
||||
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 }}
|
||||
# lint:
|
||||
# name: lint
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v1
|
||||
# - uses: actions/setup-python@v1
|
||||
# with:
|
||||
# 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
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: ${{ steps.pip-cache.outputs.dir }}
|
||||
# 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 .[test]
|
||||
# - env:
|
||||
# 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 }}
|
||||
# pip install -e .[lint]
|
||||
# - run: make lint
|
||||
|
||||
tests-integration:
|
||||
name: "tests / integration"
|
||||
runs-on: ubuntu-latest
|
||||
tests-unit:
|
||||
name: "tests / unit"
|
||||
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
|
||||
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'
|
||||
- if: matrix.test == 'other'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends ffmpeg
|
||||
- name: set pip cache dir
|
||||
id: pip-cache
|
||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||
- 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
|
||||
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]
|
||||
- env:
|
||||
TEST_DB: ${{ matrix.db }}
|
||||
run: tox -e ${{ matrix.test }}
|
||||
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')
|
||||
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:
|
||||
# needs: ["lint", "tests-unit", "tests-integration"]
|
||||
|
|
Loading…
Reference in a new issue