46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Sample build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build_wheels:
|
|
name: Sample build [${{ matrix.result }}]
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
matrix:
|
|
result: [success, failure]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
name: Install Python
|
|
with:
|
|
python-version: '3.7'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -r requirements-dev.txt
|
|
|
|
- name: Generate sample project
|
|
run: |
|
|
python -m test.test_projects test.test_testing.project_with_a_test 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
|
|
# adjust the project to cause an error
|
|
echo '
|
|
class AnotherTest:
|
|
def test_something(self):
|
|
self.fail("sabotage!")
|
|
' >> test/spam_test.py
|
|
python -m cibuildwheel --output-dir wheelhouse || true
|