Adjust sample build to show passing/failing test
Drop the 'allow fail' approach, it shows up as red in PR/commit status
This commit is contained in:
@@ -4,17 +4,11 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_wheels:
|
build_wheels:
|
||||||
name: Build wheels [${{ matrix.result }}]
|
name: Sample build [${{ matrix.result }}]
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
continue-on-error: ${{ matrix.allow_fail }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
result: [success, failure]
|
||||||
- result: success
|
|
||||||
allow_fail: false
|
|
||||||
- result: failure
|
|
||||||
allow_fail: true
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -30,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate sample project
|
- name: Generate sample project
|
||||||
run: |
|
run: |
|
||||||
python -m test.test_projects test.test_0_basic.basic_project sample_project
|
python -m test.test_projects test.test_testing.project_with_a_test sample_project
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
if: matrix.result == 'success'
|
if: matrix.result == 'success'
|
||||||
@@ -42,6 +36,10 @@ jobs:
|
|||||||
if: matrix.result == 'failure'
|
if: matrix.result == 'failure'
|
||||||
run: |
|
run: |
|
||||||
cd sample_project
|
cd sample_project
|
||||||
# sabotage the project to cause an error
|
# adjust the project to cause an error
|
||||||
echo '>' >> setup.py
|
echo '
|
||||||
python -m cibuildwheel --output-dir wheelhouse
|
class AnotherTest:
|
||||||
|
def test_something(self):
|
||||||
|
self.fail("sabotage!")
|
||||||
|
' >> test/spam_test.py
|
||||||
|
python -m cibuildwheel --output-dir wheelhouse || true
|
||||||
|
|||||||
Reference in New Issue
Block a user