Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

updated github action #89

updated github action

updated github action #89

Workflow file for this run

name: Run Tests
on:
push:
branches:
- "main"
tags:
- "v*.*.*"
pull_request:
workflow_dispatch:
jobs:
tests:
name: Python ${{ matrix.python-version }} • ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: [3.7, 3.8, 3.9]
# os: [windows-latest]
exclude:
- os: macos-latest
python-version: 3.8
- os: windows-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
- os: windows-latest
python-version: 3.9
- os: macos-latest
python-version: 3.10
- os: windows-latest
python-version: 3.10
- os: macos-latest
python-version: 3.11
- os: windows-latest
python-version: 3.11
steps:
- run: echo ${{github.ref}}
- uses: actions/checkout@v2
- name: Set up FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
with:
architecture: x64
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Setup Python dependencies
run: |
python -m pip install -U pip
pip install -U build pytest pytest-github-actions-annotate-failures
- name: Install ffmpegio package
run: pip install -q .
- name: Run tests
run: pytest -vv
distribute:
name: Distribution
runs-on: ubuntu-latest
needs: tests
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Setup Python dependencies
run: |
python -m pip install -U pip setuptools
pip install -U build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: add python distribution files to release
uses: softprops/action-gh-release@v1
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}