Skip to content

add option cache

add option cache #596

Workflow file for this run

name: "unittest for package"
on:
push:
branches: ["**"]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
poetry install --with dev
# Install FFmpeg
- name: Install FFmpeg
run: |
sudo apt-get update -q
sudo apt-get install -y wget -q
wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-6.0-amd64-static.tar.xz -q
tar -xf ffmpeg-6.0-amd64-static.tar.xz
sudo mv ffmpeg-*-amd64-static/ffmpeg /usr/local/bin/
sudo mv ffmpeg-*-amd64-static/ffprobe /usr/local/bin/
ffmpeg -version
# Install Graphviz
- name: Install Graphviz
run: sudo apt-get update && sudo apt-get install -y graphviz
- name: Check Graphviz version
run: dot -V
- name: Install GCC
run: sudo apt-get update && sudo apt-get install -y build-essential nasm
# Run linting
- name: Linting
run: poetry run pre-commit run --all-files
working-directory: src
# Run unittests
- name: Run Unittest
run: poetry run pytest src/ --cov=./src --cov-report xml
# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: ${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
# Build Mkdocs
- name: Build Mkdocs
run: poetry run mkdocs build