Skip to content

Update README.md

Update README.md #209

name: tests
on:
push:
branches:
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
# Run all supported Python versions on linux
python-version: ["3.8", "3.9", "3.10"]
platform: [ubuntu-latest]
# Include one windows and macos run
include:
- platform: macos-latest
python-version: "3.9"
- platform: windows-latest
python-version: "3.9"
steps:
# Setup pyqt libraries
- uses: tlambert03/setup-qt-libs@v1
# Run tests
- uses: UCL/composite-actions/python/tox@v1
with:
python-version: ${{ matrix.python-version }}
# Upload code coverage
- name: Coverage
uses: codecov/codecov-action@v3
deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build
twine upload dist/*