59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
workflow_dispatch:
|
|
# allow manual runs on branches without a PR
|
|
|
|
jobs:
|
|
pre-commit:
|
|
name: Pre-commit checks (mypy, flake8, etc.)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
- uses: pre-commit/action@v2.0.0
|
|
|
|
test:
|
|
name: Test cibuildwheel on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
# os: [ubuntu-latest, windows-latest, macos-11.0]
|
|
os: [macos-11.0]
|
|
python_version: ['3.7']
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
name: Install Python ${{ matrix.python_version }}
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -r requirements-dev.txt
|
|
|
|
- name: Install Visual C++ for Python 2.7
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
choco install vcpython27 -f -y
|
|
|
|
- name: Get PR labels
|
|
id: pr-labels
|
|
uses: joerick/pr-labels-action@v1.0.6
|
|
|
|
- name: Sample build
|
|
if: contains(steps.pr-labels.outputs.labels, ' ci-sample-build ')
|
|
run: |
|
|
python bin/sample_build.py
|
|
|
|
- name: Test cibuildwheel
|
|
run: |
|
|
python ./bin/run_tests.py
|