Skip to content

Increasing batch size from 3 to 6 to improve performance of batch pat… #798

Increasing batch size from 3 to 6 to improve performance of batch pat…

Increasing batch size from 3 to 6 to improve performance of batch pat… #798

Workflow file for this run

name: Workflow for Codecov
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
codecov-python-39:
runs-on: windows-latest
env:
PYTHONTRACEMALLOC: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: pip install coverage
- name: Run extension tests
continue-on-error: true
shell: cmd
run: |
cd ./src/extension/tests
echo '===============START EXTENSION TESTS...===============' >> ../../../err.txt
coverage run -m unittest discover -s . -t ../../ 2>> ../../../err.txt
echo '===============FINISH EXTENSION TESTS...===============' >> ../../../err.txt
- name: Run core tests
continue-on-error: true
shell: cmd
run: |
cd ./src/core/tests
echo '===============START CORE TESTS...===============' >> ../../../err.txt
coverage run -m unittest discover -s . -t ../../ 2>> ../../../err.txt
echo '===============FINISH CORE TESTS...===============' >> ../../../err.txt
- name: Collect coverage
run: |
cd ./src/core/tests
coverage xml
cd ../../extension/tests
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: python39
name: python-39
fail_ci_if_error: true
- name: Read test output
id: getoutput
run: echo "::set-output name=contents::$(cat err.txt)"
- name: Check if all tests passed
if: contains( steps.getoutput.outputs.contents, 'FAILED (failures=' )
shell: cmd
run: |
echo "${{ steps.getoutput.outputs.contents }}"
exit 1
codecov-python-27:
runs-on: windows-latest
needs: codecov-python-39
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore Python 2.7 cache
uses: actions/cache@v2
with:
path: C:\Python27
key: python27-cache
- name: Install Python 2.7
shell: cmd
run: |
echo "check if python27 is not cached"
if not exist C:\Python27 (
choco install python2 -y
SETX PATH "%PATH%;C:\Python27"
)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '%UserProfile%\.cache\pip'
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
shell: cmd
run: pip install -r .github/workflows/requirements.txt
- name: Run extension tests
continue-on-error: true
shell: cmd
run: |
cd ./src/extension/tests
echo '===============START EXTENSION TESTS...===============' >> ../../../err2.txt
coverage run -m unittest discover -s . -t ../../ 2>> ../../../err2.txt
echo '===============FINISH EXTENSION TESTS...===============' >> ../../../err2.txt
- name: Run core tests
continue-on-error: true
shell: cmd
run: |
cd ./src/core/tests
echo '===============START CORE TESTS...===============' >> ../../../err2.txt
coverage run -m unittest discover -s . -t ../../ 2>> ../../../err2.txt
echo '===============FINISH CORE TESTS...===============' >> ../../../err2.txt
- name: Collect coverage
run: |
cd ./src/core/tests
coverage xml
cd ../../extension/tests
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: python27
name: python-27
fail_ci_if_error: true
- name: Read test output
id: getoutput
run: echo "::set-output name=contents::$(cat err2.txt)"
- name: Check if all tests passed
if: contains( steps.getoutput.outputs.contents, 'FAILED (failures=' )
run: |
echo "${{ steps.getoutput.outputs.contents }}"
echo "There are failed tests"
exit 1