[Tests] Removed debug and unified dirs

This commit is contained in:
Salvador E. Tropea 2022-07-09 20:43:54 -03:00
parent 54e14f0443
commit b92a233b1d
1 changed files with 9 additions and 25 deletions

View File

@ -44,48 +44,32 @@ jobs:
flake8 . --count --exit-zero --statistics flake8 . --count --exit-zero --statistics
- name: Test ${{ matrix.ki_release }} - name: Test ${{ matrix.ki_release }}
run: | run: |
rm -rf output_fast rm -rf output
rm -rf output_slow
rm -f tests/.local rm -f tests/.local
mkdir output_fast # The KiCad 5 image currently has a very old pytest (no parallel run)
mkdir output_slow
echo pwd
pwd
ls -la
echo -----------------
pip3 install --upgrade pytest pip3 install --upgrade pytest
pip3 install --upgrade pytest-xdist pip3 install --upgrade pytest-xdist
# Ensure we start a fresh coverage meassurement
python3-coverage erase python3-coverage erase
# Create the caches with macros # Create the caches with macros
python3-coverage run src/kibot --help-outputs > /dev/null python3-coverage run src/kibot --help-outputs > /dev/null
# Individual run for specific tests # Individual run for specific tests
# pytest --log-cli-level debug -k "test_ibom_parse_fail" --test_dir=output_fast # pytest --log-cli-level debug -k "test_ibom_parse_fail" --test_dir=output
# Run the 90% faster tests (under 3 s) # Run the 90% faster tests (under 3 s)
# Do it in parallel # Do it in parallel
pytest -v --durations=0 -m "not slow" -n 2 --test_dir=output_fast pytest -v --durations=0 -m "not slow" -n 2 --test_dir=output
echo -----------------
ls -la
ls -lad output_fast
ls -la output_fast
echo -----------------
# Run the slowest at the end and exit on the first error # Run the slowest at the end and exit on the first error
pytest -v --durations=0 -m slow -x --test_dir=output_slow pytest -v --durations=0 -m slow -x --test_dir=output
echo -----------------
ls -la
ls -lad output_slow
ls -la output_slow
echo -----------------
python3-coverage combine python3-coverage combine
python3-coverage report python3-coverage report
python3-coverage html -d output/htmlcov python3-coverage html -d output/htmlcov
- name: Store results - name: Store results
if: ${{ always() }} if: ${{ always() }}
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
name: Test_Output_${{ matrix.ki_release }} name: Test_Output_${{ matrix.ki_release }}
path: | # Important! empty directories are skipped!!!!
output_fast path: output
output_slow
- name: Upload Coverage - name: Upload Coverage
env: env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}