Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Windows CI for HwCodecDetect

on:
push:
branches: [ main, testci ]
pull_request:
branches: [ main, testci ]

jobs:
test-on-windows:
runs-on: windows-latest

defaults:
run:
shell: pwsh

env:
PYTHONIOENCODING: utf-8

steps:
- name: Clone HwCodecDetect
run: git clone -b main --single-branch https://github.com/whyb/HwCodecDetect.git

- name: Upgrade pip
run: python -m pip install --upgrade pip
working-directory: HwCodecDetect

- name: Install dependencies
run: python -m pip install -r requirements.txt
working-directory: HwCodecDetect

- name: Run tests
run: python -m src.HwCodecDetect.run_tests
working-directory: HwCodecDetect
12 changes: 10 additions & 2 deletions src/HwCodecDetect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# HwCodecDetect/__init__.py

import os
from .install_ffmpeg_if_needed import install_ffmpeg_if_needed
from .version import __version__

def _read_version():
try:
version_path = os.path.join(os.path.dirname(__file__), '..', '..', 'VERSION')
with open(version_path, encoding='utf-8') as f:
return f.read().strip()
except Exception:
return "0.0.0"

__version__ = _read_version()
__author__ = "whyb"
__email__ = "whyber@outlook.com"
__license__ = "BSD-3-Clause"
Expand Down
Loading