Skip to content

needs から削除する #129

needs から削除する

needs から削除する #129

Workflow file for this run

name: e2e-test
on:
workflow_dispatch:
push:
paths-ignore:
- "doc/**"
- "**.md"
jobs:
e2e_ubuntu_test:
strategy:
matrix:
python_version: ["3.10", "3.11", "3.12"]
os: ["ubuntu-22.04", "ubuntu-24.04"]
runs-on: ${{ matrix.os}}
timeout-minutes: 20
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
steps:
- uses: actions/checkout@v4
# libx11-dev は Ubuntu 24.04 の時に必要になる模様
- run: |
sudo apt-get update
sudo apt-get -y install libva-dev libdrm-dev libx11-dev
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-2.4.1-linux64.7.so.bz2
bzip2 -d libopenh264-2.4.1-linux64.7.so.bz2
mv libopenh264-2.4.1-linux64.7.so libopenh264.so
echo "OPENH264_PATH=$(pwd)/libopenh264.so" >> $GITHUB_ENV
working-directory: ./tests
- uses: eifinger/setup-rye@v4
- run: rye pin ${{ matrix.python_version }}
- run: rye sync
- run: rye run python run.py ${{ matrix.os }}_x86_64
# - run: rye test
- run: rye run pytest tests/test_sendonly_recvonly.py -s
- run: rye run pytest tests/test_messaging.py -s
- run: rye run pytest tests/test_openh264.py -s
- run: rye run pytest tests/test_stats.py -s
- run: rye run pytest tests/test_switched.py -s
- run: rye run pytest tests/test_vad.py -s
e2e_macos_test:
strategy:
matrix:
python_version: ["3.10", "3.11", "3.12"]
os: ["macos-13", "macos-14"]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
steps:
- uses: actions/checkout@v4
- name: Download openh264
run: |
curl -LO http://ciscobinary.openh264.org/libopenh264-2.4.1-mac-arm64.dylib.bz2
bzip2 -d libopenh264-2.4.1-mac-arm64.dylib.bz2
mv libopenh264-2.4.1-mac-arm64.dylib libopenh264.dylib
echo "OPENH264_PATH=$(pwd)/libopenh264.dylib" >> $GITHUB_ENV
working-directory: ./tests
- uses: eifinger/setup-rye@v4
- run: rye pin ${{ matrix.python_version }}
- run: rye sync
- run: rye run python run.py macos_arm64
# - run: rye test
# macOS のテストを先にする
- run: rye run pytest tests/test_macos.py -s
- run: rye run pytest tests/test_sendonly_recvonly.py -s
- run: rye run pytest tests/test_messaging.py -s
- run: rye run pytest tests/test_openh264.py -s
- run: rye run pytest tests/test_stats.py -s
- run: rye run pytest tests/test_switched.py -s
- run: rye run pytest tests/test_vad.py -s
# まだ Windows で E2E テストは早かったかもしれない
# e2e_windows_test:
# strategy:
# matrix:
# # python_version: ["3.10", "3.11", "3.12"]
# python_version: ["3.12"]
# runs-on: windows-2022
# timeout-minutes: 20
# env:
# TEST_SIGNALING_URL: ${{ secrets.TEST_SIGNALING_URL }}
# TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
# TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
# steps:
# - uses: actions/checkout@v4
# - uses: eifinger/setup-rye@v4
# - run: rye pin ${{ matrix.python_version }}
# - run: rye sync
# - run: rye run python run.py windows_x86_64
# - run: rye run pytest tests/test_sendonly_recvonly.py -s
slack_notify_succeeded:
needs: [e2e_ubuntu_test, e2e_macos_test]
runs-on: ubuntu-latest
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_ubuntu_test, e2e_macos_test]
runs-on: ubuntu-latest
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 }}