Update test.yml #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package | |
on: | |
push: | |
pull_request: | |
types: [ opened, synchronize, reopened, edited ] | |
jobs: | |
build: | |
if: github.repository_owner == 'telegraphic' | |
name: ${{ matrix.os}} ${{ matrix.architecture }}, Python ${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
architecture: [x64, arm64] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
exclude: | |
- os: windows-latest | |
architecture: arm64 | |
- os: ubuntu-latest | |
architecture: arm64 | |
- os: macos-latest # Support from 3.10 onwards | |
architecture: arm64 | |
python-version: '3.7' | |
- os: macos-latest | |
architecture: arm64 | |
python-version: '3.8' | |
- os: macos-latest | |
architecture: arm64 | |
python-version: '3.9' | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.architecture }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel virtualenv | |
pip install -r requirements_test.txt | |
pip install tox tox-gh-actions | |
- name: Test deployment | |
run: | | |
check-manifest | |
python setup.py sdist bdist_wheel | |
twine check dist/* | |
- name: Test package | |
run: | | |
tox | |
env: | |
TOX_H5PY_REQIREMENTS: ${{ matrix.architecture == 'x86' && '32' || ''}} | |
PLATFORM: ${{ matrix.platform }} | |
- name: Upload coverage | |
if: ${{ success() && github.repository == 'telegraphic/hickle' }} | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
- name: Deploy package | |
if: ${{ success() && matrix.os == 'ubuntu-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
twine upload --skip-existing dist/* | |