Skip to content

TestOnMacOs

TestOnMacOs #102

Workflow file for this run

name: TestOnMacOs
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: "37 10 * * 3"
jobs:
TestScript:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Get latest ytdl_hook.lua
run: |
wget https://github.com/mpv-player/mpv/raw/master/player/lua/ytdl_hook.lua
- name: Install mpv
run: |
brew install ffmpeg luajit mujs uchardet vapoursynth
brew install --ignore-dependencies mpv
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
- name: Test mpv
run: |
mpv
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install yt-dlp from pip
run: |
pip install --upgrade yt-dlp
which yt-dlp
- name: Test yt-dlp
run: |
yt-dlp --version
- name: ⏯️ Run mpv with youtube-upnext userscript
run: |
ytloc=$(which yt-dlp)
output=$(mpv --ytdl=no --script-opts="ytdl_hook-ytdl_path=$ytloc,youtube-upnext-auto_add=no,youtube-upnext-fetch_on_start=yes,youtube-upnext-use_json_lua=yes" --scripts=ytdl_hook.lua:youtube-upnext.lua --msg-level=youtube_upnext=trace "https://www.youtube.com/watch?v=VpOLXXBcAl0" 2>&1)
echo $output
if [[ $output == *"downloaded and decoded json successfully"* ]]; then
exit 0
else
echo "Not found: downloaded and decoded json successfully"
exit 1
fi