|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: {} |
| 4 | + push: {} |
| 5 | + |
| 6 | +jobs: |
| 7 | + test: |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 12 | + python-version: [3.6, 3.7, 3.8, 3.9-dev, pypy3] |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@master |
| 15 | + - name: Setup python |
| 16 | + uses: actions/setup-python@v2 |
| 17 | + with: |
| 18 | + python-version: ${{ matrix.python-version }} |
| 19 | + |
| 20 | + - uses: actions-rs/toolchain@v1 |
| 21 | + with: |
| 22 | + profile: minimal |
| 23 | + toolchain: stable |
| 24 | + override: true |
| 25 | + |
| 26 | + # Install dependencies on ubuntu |
| 27 | + - if: matrix.os == 'ubuntu-latest' |
| 28 | + name: Install build dependencies |
| 29 | + run: sudo apt-get install -y libxml2-dev libxslt-dev |
| 30 | + |
| 31 | + # Install 32-bit windows target for pypy3 |
| 32 | + - if: matrix.os == 'windows-latest' && matrix.python-version == 'pypy3' |
| 33 | + name: Install 32-bit Rust target |
| 34 | + uses: actions-rs/toolchain@v1 |
| 35 | + with: |
| 36 | + profile: minimal |
| 37 | + toolchain: stable |
| 38 | + override: true |
| 39 | + target: i686-pc-windows-msvc |
| 40 | + |
| 41 | + - name: Build package |
| 42 | + run: pip install -e . |
| 43 | + |
| 44 | + - name: Test tomlgen_rust |
| 45 | + shell: bash |
| 46 | + run: | |
| 47 | + pip install wheel |
| 48 | + cd example_tomlgen |
| 49 | + python setup.py tomlgen_rust -w build |
| 50 | +
|
| 51 | + # FIXME: Can't test easily on windows 3.9 or pypy because have to build lxml from source! |
| 52 | + - name: Test html-py-ever |
| 53 | + if: ${{ !(matrix.os == 'windows-latest' && (matrix.python-version == 'pypy3' || matrix.python-version == '3.9')) }} |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + cd html-py-ever |
| 57 | + pip install -r requirements-dev.txt |
| 58 | + python setup.py install |
| 59 | + cd test && pytest |
| 60 | +
|
| 61 | + - name: Test other examples |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + cd examples/ |
| 65 | + # PEP517 build isolation means we don't use the setuptools-rust locally, |
| 66 | + # instead it installs from PyPI! |
| 67 | + pip install --no-use-pep517 -e rust_with_cffi/ |
| 68 | + pip install -r rust_with_cffi/requirements-dev.txt |
| 69 | + pytest rust_with_cffi/tests.py |
0 commit comments