-
Notifications
You must be signed in to change notification settings - Fork 28
73 lines (60 loc) · 2.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: test LDDC
on:
push:
branches:
- main
- dev
paths:
- "**.py"
- ".github/workflows/test.yml"
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-13, windows-latest]
arch: [x64]
include:
- os: macos-latest
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: ${{ matrix.arch }}
- name: Install dependencies
run: |
pip install -Ur requirements-tests.txt
pip install .
- name: Install FFmpeg(Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Install FFmpeg(Windows)
if: runner.os == 'Windows'
run: choco install ffmpeg -y
- name: Install FFmpeg(Mac)
if: runner.os == 'macOS'
run: brew install ffmpeg
- name: Install GUI dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev libqt5gui5 libqt5widgets5 xvfb
- name: Run tests
run: |
pytest --cov=lddc --cov-report=xml --cov-report=html --disable-warnings
- name: Save test artifacts
if: always()
run: |
mkdir -p tests/artifacts/reports
cp -r htmlcov ./tests/artifacts/reports
cp coverage.xml ./tests/artifacts/reports
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: artifacts-${{ matrix.os }}
path: tests/artifacts