Sample build uses a testcase failure project

This commit is contained in:
Joe Rickerby
2020-11-04 16:08:40 +00:00
parent fbbc295901
commit c9ea0251fe
2 changed files with 20 additions and 13 deletions
+7 -11
View File
@@ -24,17 +24,13 @@ jobs:
- name: Generate sample project
run: |
python -m test.test_projects test.test_testing.project_with_a_test sample_project
- name: Add a failing test
if: matrix.result == 'failure'
run: |
cd sample_project
echo '
class AnotherTest:
def test_something(self):
self.fail("sabotage!")
' >> test/spam_test.py
if $should_fail; then
python -m test.test_projects test.test_testing.project_with_a_failing_test sample_project
else
python -m test.test_projects test.test_testing.project_with_a_test sample_project
fi
env:
should_fail: ${{ matrix.result == 'failure' }}
- name: Build & test wheels
run: |