* fix: code coverage added * fix: .coverage folder added * fix: .coverage folder location changed * fix: combine folder modified * fix: combine command updated * fix: .coverage folder rollback * fix: path commented * fix: upload path modified * fix: path updated to root * fix: .coveragerc added * fix: new coverage folder added * fix: combine path removed * fix: coverage files path changed * fix: data files path updated * fix: .coverage added as path * fix: coveragerc updated * fix: env TEST_SUIT rollbacked * fix: renaming coverage files step added * fix: ls added for testing * fix: debugging commands added * fix: triggeering cov command in tox.in * fix: cd coverage added * fix: commands modified * fix: triggering coverage using command * fix: removed omitteed files * fix: removed all omited files * fix: skipped all omitted files * fix: source updated to root in coveragern * fix: coveragerc files rolledback * fix: source changed to edx-platform * fix: cms-2 shard name reemoved * fix: rmeoved coveragee trigger * fix: removed shard added back * fix: --cov-config=setup.cfg added * fix: combining cov paths format changed to comma * fix: bash changeeed for coveerage * fix: paths updateed for testing * fix: coverage combine command fixed * fix: final check applied * fix: final coveragee step addeed and tested * fix: actions version upgraded in unit tests * fix: testing space separated commands * fix: coverage data files path removeed from combine command * fix: coverage combine reports/* addedd * fix: updated --cov path * fix: data_file path updated by removing TEST_SUIT variable --------- Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: 'Run unit tests'
|
|
description: 'shared steps to run unit tests on both Github hosted and self hosted runners.'
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: set settings path
|
|
shell: bash
|
|
run: |
|
|
echo "settings_path=$(python scripts/unit_test_shards_parser.py --shard-name=${{ matrix.shard_name }} --output settings )" >> $GITHUB_ENV
|
|
|
|
- name: get unit tests for shard
|
|
shell: bash
|
|
run: |
|
|
echo "unit_test_paths=$(python scripts/unit_test_shards_parser.py --shard-name=${{ matrix.shard_name }} )" >> $GITHUB_ENV
|
|
|
|
- name: run tests
|
|
shell: bash
|
|
run: |
|
|
python -Wd -m pytest -p no:randomly --ds=${{ env.settings_path }} ${{ env.unit_test_paths }} --cov=.
|
|
|
|
- name: rename warnings json file
|
|
if: success()
|
|
shell: bash
|
|
run: |
|
|
cd test_root/log
|
|
mv pytest_warnings.json pytest_warnings_${{ matrix.shard_name }}.json
|
|
|
|
- name: save pytest warnings json file
|
|
if: success()
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: pytest-warnings-json
|
|
path: |
|
|
test_root/log/pytest_warnings*.json
|