GHA build tweak
This commit is contained in:
@@ -26,20 +26,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m test.test_projects test.test_testing.project_with_a_test sample_project
|
python -m test.test_projects test.test_testing.project_with_a_test sample_project
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Add a failing test
|
||||||
if: matrix.result == 'success'
|
|
||||||
run: |
|
|
||||||
cd sample_project
|
|
||||||
python -m cibuildwheel --output-dir wheelhouse
|
|
||||||
|
|
||||||
- name: Build wheels [expected failure]
|
|
||||||
if: matrix.result == 'failure'
|
if: matrix.result == 'failure'
|
||||||
run: |
|
run: |
|
||||||
cd sample_project
|
cd sample_project
|
||||||
# adjust the project to cause an error
|
|
||||||
echo '
|
echo '
|
||||||
class AnotherTest:
|
class AnotherTest:
|
||||||
def test_something(self):
|
def test_something(self):
|
||||||
self.fail("sabotage!")
|
self.fail("sabotage!")
|
||||||
' >> test/spam_test.py
|
' >> test/spam_test.py
|
||||||
python -m cibuildwheel --output-dir wheelhouse || true
|
|
||||||
|
- name: Build & test wheels
|
||||||
|
run: |
|
||||||
|
cd sample_project
|
||||||
|
if $should_fail; then
|
||||||
|
# prefix with ! to expect failure
|
||||||
|
! python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
else
|
||||||
|
python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
CIBW_TEST_COMMAND: nosetests {project}/test
|
||||||
|
CIBW_TEST_REQUIRES: nose
|
||||||
|
should_fail: ${{ matrix.result == 'failure' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user