Skip to content

Commit

Permalink
ci: split x86 pytests by directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel committed Jan 26, 2024
1 parent b96ef37 commit 7e9229f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/pnl-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,28 @@ jobs:
Linux*) lscpu;;
esac
- name: Test with pytest
- name: Test with pytest (non-x86)
timeout-minutes: 180
run: pytest --junit-xml=tests_out.xml --verbosity=0 -n auto ${{ matrix.extra-args }}
if: (! contains(matrix.python-architecture, 'x86'))

# run tests in each dir separately to reduce peak memory usage
- name: Test with pytest (x86)
timeout-minutes: 180
shell: bash
# any non-zero exit code will indicate failure for GHA
run: |
res=0
test_dirs=$(find psyneulink tests/* -maxdepth 0 -type d)
for td in $test_dirs; do echo "Running pytest $td"; pytest --junit-xml=tests_$(echo $td | sed 's;/;_;g').xml --verbosity=0 -n auto ${{ matrix.extra-args }} "$td"; res+=$?; done
(exit $res)
if: contains(matrix.python-architecture, 'x86')

- name: Merge junit xml (x86)
run: |
pip install junitparser
junitparser merge tests*.xml tests_out.xml
if: contains(matrix.python-architecture, 'x86')

- name: Upload test results
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 7e9229f

Please sign in to comment.