-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-srt-support
- Loading branch information
Showing
11 changed files
with
550 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Python Samples Script | ||
|
||
on: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
run-selenium: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install selenium | ||
pip install requests | ||
- name: Install FFmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Install SRT | ||
run: | | ||
git clone https://github.com/Haivision/srt.git | ||
cd srt | ||
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential | ||
./configure | ||
make | ||
sudo make install | ||
cd .. | ||
- name: Install Chrome | ||
run: | | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
sudo dpkg -i google-chrome-stable_current_amd64.deb | ||
- name: Install ChromeDriver | ||
run: | | ||
wget https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chromedriver-linux64.zip | ||
unzip chromedriver-linux64.zip | ||
cd chromedriver-linux64 | ||
sudo mv chromedriver /usr/bin/chromedriver | ||
sudo chown root:root /usr/bin/chromedriver | ||
sudo chmod +x /usr/bin/chromedriver | ||
- name: Run Selenium script | ||
run: | | ||
python Selenium/antmedia-samples.py | ||
- name: Install jq | ||
run: sudo apt-get install -y jq | ||
|
||
- name: Send Slack notification on failure | ||
if: ${{ failure() || cancelled() }} | ||
run: | | ||
SLACK_PAYLOAD=$(jq -n --arg text "<@U01UMD36SQ0> GitHub Workflow failed for ${{ github.repository }}" '{text: $text, icon_emoji: ":x:"}') | ||
curl -X POST -H 'Content-type: application/json' --data "$SLACK_PAYLOAD" ${{ env.WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{# | ||
Copyright 2016 Google Inc. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
#} | ||
|
||
resources: | ||
- type: compute.v1.firewall | ||
name: ams-mongodb-internal | ||
properties: | ||
network: $(ref.antmedia-vpc-network.selfLink) | ||
sourceRanges: | ||
- 10.0.0.0/16 | ||
targetTags: | ||
- antmedia-mongodb | ||
allowed: | ||
- IPProtocol: tcp | ||
ports: | ||
- "27017" | ||
- "22" | ||
|
||
- type: compute.v1.firewall | ||
name: ams-antmedia-external | ||
properties: | ||
network: $(ref.antmedia-vpc-network.selfLink) | ||
sourceRanges: | ||
- 0.0.0.0/0 | ||
targetTags: | ||
- antmedia | ||
allowed: | ||
- IPProtocol: tcp | ||
ports: | ||
- "5080" | ||
- "22" | ||
- "1935" | ||
|
Oops, something went wrong.