From 4eff3bc7a85b07bf66a3b6793a45b133b85bc42e Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 1 Nov 2020 17:06:55 +0000 Subject: [PATCH] Add a failure example build --- .github/workflows/sample_build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sample_build.yml b/.github/workflows/sample_build.yml index d08714fd..4ff80b52 100644 --- a/.github/workflows/sample_build.yml +++ b/.github/workflows/sample_build.yml @@ -4,11 +4,11 @@ on: [push, pull_request] jobs: build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build wheels [${{ matrix.result }}] + runs-on: ubuntu-18.04 strategy: matrix: - os: [ubuntu-18.04] + result: [success, failure] steps: - uses: actions/checkout@v2 @@ -27,6 +27,15 @@ jobs: python -m test.test_projects test.test_0_basic.basic_project sample_project - name: Build wheels + if: matrix.result == 'success' run: | cd sample_project python -m cibuildwheel --output-dir wheelhouse + + - name: Build wheels [expected failure] + if: matrix.result == 'failure' + run: | + cd sample_project + # sabotage the project to cause an error + echo '>' >> setup.py + python -m cibuildwheel --output-dir wheelhouse || true