Minor tuning of tests (#2201)

- Reduce verbosity for unit tests
- Refactor GH actions config and try again macos behave tests
This commit is contained in:
Alexander Kukushkin
2022-02-10 15:38:16 +01:00
committed by GitHub
parent afab392ead
commit d3e3b4e16f
6 changed files with 23 additions and 44 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ def main():
version = versions.get(what)
path = '/usr/lib/postgresql/{0}/bin:.'.format(version)
unbuffer = ['timeout', '600', 'unbuffer']
unbuffer = ['timeout', '900', 'unbuffer']
args = ['--tags=-skip'] if what == 'etcd' else []
else:
path = os.path.abspath(os.path.join('pgsql', 'bin'))
+16 -41
View File
@@ -93,80 +93,55 @@ jobs:
env:
DCS: ${{ matrix.dcs }}
ETCDVERSION: 3.3.13
PGVERSION: 12.1-1 # for windows and macos
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python-version: [2.7, 3.6, 3.9]
dcs: [etcd, etcd3, consul, exhibitor, kubernetes, raft]
exclude:
- dcs: kubernetes
python-version: 2.7
include:
- os: macos
python-version: 3.7
dcs: raft
- os: macos
python-version: 3.8
dcs: etcd
- os: macos
python-version: '3.10'
dcs: etcd3
steps:
- uses: actions/checkout@v1
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- name: Add postgresql apt repo
run: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
if: matrix.os == 'ubuntu'
- name: Install dependencies
run: python .github/workflows/install_deps.py
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- name: Run behave tests
run: python .github/workflows/run_tests.py
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- uses: actions/setup-python@v2
with:
python-version: '3.10'
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- name: Install coveralls
run: python -m pip install coveralls
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
- name: Upload Coverage
env:
COVERALLS_FLAG_NAME: behave-${{ matrix.os }}-${{ matrix.dcs }}-${{ matrix.python-version }}
COVERALLS_PARALLEL: 'true'
GITHUB_TOKEN: ${{ secrets.github_token }}
run: python -m coveralls --service=github
if: matrix.python-version != 2.7 || matrix.dcs != 'kubernetes'
# behavem:
# runs-on: ${{ matrix.os }}-latest
# env:
# DCS: ${{ matrix.dcs }}
# ETCDVERSION: 3.3.13
# PGVERSION: 14.1-1 # for windows and macos
# strategy:
# fail-fast: false
# matrix:
# os: [macos] #, windows]
# python-version: [3.7]
# dcs: [etcd, etcd3, raft]
#
# steps:
# - uses: actions/checkout@v1
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: python .github/workflows/install_deps.py
# - name: Run behave tests
# run: python .github/workflows/run_tests.py
# - name: Install coveralls
# run: python -m pip install coveralls
# - name: Upload Coverage
# env:
# COVERALLS_FLAG_NAME: behave-${{ matrix.os }}-${{ matrix.dcs }}-${{ matrix.python-version }}
# COVERALLS_PARALLEL: 'true'
# GITHUB_TOKEN: ${{ secrets.github_token }}
# run: python -m coveralls --service=github
coveralls-finish:
name: Finalize coveralls.io
needs: [unit, behave] #, behavem]
needs: [unit, behave]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2