Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
94 lines
2.2 KiB
YAML
94 lines
2.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
workflow_dispatch:
|
|
# allow manual runs on branches without a PR
|
|
|
|
concurrency:
|
|
group: test-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Linters (mypy, flake8, etc.)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v3
|
|
- uses: pre-commit/action@v2.0.3
|
|
- name: Check manifest
|
|
run: pipx run nox -s check_manifest
|
|
- name: PyLint checks
|
|
run: |
|
|
echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
|
|
pipx run nox -s pylint
|
|
|
|
test:
|
|
name: Test cibuildwheel on ${{ matrix.os }}
|
|
needs: lint
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-11]
|
|
python_version: ['3.10']
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v3
|
|
name: Install Python ${{ matrix.python_version }}
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install ".[test]"
|
|
|
|
- name: Sample build
|
|
if: "contains(github.event.pull_request.labels.*.name, 'CI: Sample build')"
|
|
run: |
|
|
python bin/sample_build.py
|
|
|
|
- name: Get some sample wheels
|
|
run: |
|
|
python -m test.test_projects test.test_0_basic.basic_project sample_proj
|
|
cibuildwheel --output-dir wheelhouse sample_proj
|
|
env:
|
|
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: sample_wheels
|
|
path: wheelhouse
|
|
|
|
- name: Test cibuildwheel
|
|
run: |
|
|
python ./bin/run_tests.py
|
|
|
|
test-emulated:
|
|
name: Test emulated cibuildwheel using qemu
|
|
needs: lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 180
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v3
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install ".[test]"
|
|
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v1
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Run the emulation tests
|
|
run: |
|
|
pytest --run-emulation test/test_emulation.py
|