-
Notifications
You must be signed in to change notification settings - Fork 3
138 lines (131 loc) · 4.87 KB
/
e2e-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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: e2e-test
on:
push:
paths-ignore:
- "**.md"
schedule:
# UTC の 01:00 は JST だと 10:00 。
# 1-5 で 月曜日から金曜日
- cron: "0 1 * * 1-5"
env:
TEST_SIGNALING_URLS: ${{ secrets.TEST_SIGNALING_URLS }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
OPENH264_VERSION: 2.4.1
jobs:
e2e_test_ubuntu:
strategy:
matrix:
# mediapipe が Python 3.13 に対応していない
# python_version: ["3.10", "3.11", "3.12", "3.13"]
python_version: ["3.10", "3.11", "3.12"]
os: ["ubuntu-22.04", "ubuntu-24.04"]
runs-on: ${{ matrix.os}}
timeout-minutes: 15
if: >-
${{
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'schedule'
}}
steps:
- uses: actions/checkout@v4
# libx11-dev は Ubuntu 24.04 の時に必要になる模様
- run: |
sudo apt-get update
sudo apt-get -y install libva2 libdrm2 libva-dev libdrm-dev libx11-dev portaudio19-dev
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so.bz2
bzip2 -d libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so.bz2
mv libopenh264-${{ env.OPENH264_VERSION }}-linux64.7.so libopenh264.so
echo "OPENH264_PATH=$(pwd)/libopenh264.so" >> $GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run pytest -s
e2e_test_macos:
strategy:
matrix:
# mediapipe が Python 3.13 に対応していない
# python_version: ["3.10", "3.11", "3.12", "3.13"]
python_version: ["3.10", "3.11", "3.12"]
# macos-13 は test_macos.py が上手くテストが動かないのでスキップ
os: ["macos-14", "macos-15"]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
if: >-
${{
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'schedule'
}}
steps:
- uses: actions/checkout@v4
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib.bz2
bzip2 -d libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib.bz2
mv libopenh264-${{ env.OPENH264_VERSION }}-mac-arm64.dylib libopenh264.dylib
echo "OPENH264_PATH=$(pwd)/libopenh264.dylib" >> $GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run pytest -s
e2e_test_windows:
strategy:
matrix:
# mediapipe が Python 3.13 に対応していない
# python_version: ["3.10", "3.11", "3.12", "3.13"]
python_version: ["3.10", "3.11", "3.12"]
runs-on: windows-2022
timeout-minutes: 15
env:
# Python を強制的に UTF-8 で利用するおまじない
PYTHONUTF8: 1
if: >-
${{
contains(github.event.head_commit.message, '[e2e]') ||
contains(github.ref, 'feature/e2e-test') ||
github.event_name == 'schedule'
}}
steps:
- uses: actions/checkout@v4
- name: Download openh264
shell: pwsh
run: |
$url = "http://ciscobinary.openh264.org/openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2"
Invoke-WebRequest -Uri $url -OutFile "openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2"
7z e openh264-${{ env.OPENH264_VERSION }}-win64.dll.bz2
Rename-Item -Path "openh264-${{ env.OPENH264_VERSION }}-win64.dll" -NewName "libopenh264.dll"
echo "OPENH264_PATH=$PWD\libopenh264.dll" >> $env:GITHUB_ENV
- uses: astral-sh/setup-uv@v3
- run: uv python pin ${{ matrix.python_version }}
- run: uv sync
- run: uv run pytest -s
# slack_notify_succeeded:
# needs: [e2e_test_ubuntu, e2e_test_macos, e2e_test_windows]
# runs-on: ubuntu-24.04
# if: success()
# steps:
# - name: Slack Notification
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: sora-python-sdk
# SLACK_COLOR: good
# SLACK_TITLE: SUCCEEDED
# SLACK_ICON_EMOJI: ":star-struck:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
slack_notify_failed:
needs: [e2e_test_ubuntu, e2e_test_macos, e2e_test_windows]
runs-on: ubuntu-24.04
if: failure()
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: sora-python-sdk
SLACK_COLOR: danger
SLACK_TITLE: "FAILED"
SLACK_ICON_EMOJI: ":japanese_ogre:"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}