ci: Convert GitLab CI/CD to GitHub Actions #8
Workflow file for this run
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
name: Video Scraper Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
python-compile-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Python Compile Test | |
run: python3 -m py_compile vo-scraper.py | |
ensure-same-version: | |
runs-on: ubuntu-latest | |
needs: python-compile-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Ensure Same Version | |
run: grep -q $(sed -n "s/^.*program_version = '\(.*\)'$/\1/p" vo-scraper.py) VERSION | |
unprotected-recording: | |
runs-on: ubuntu-latest | |
needs: python-compile-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: pip3 install requests | |
- name: Download unprotected video | |
run: | | |
python3 vo-scraper.py --disable-hints --hide-progress-bar --quality lowest --latest https://video.ethz.ch/lectures/d-infk/2020/spring/252-0028-00L.html | |
echo $(sha1sum Lecture\ Recordings/Digital\ Design\ and\ Computer\ Architecture/2020-03-12_360p-3ebf562d.mp4) | grep -q f80bcc1c215cebf64a4da7f9623406fb1309e512 | |
pwd-protected-recording: | |
runs-on: ubuntu-latest | |
needs: python-compile-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: pip3 install requests | |
- name: Download password protected video | |
run: | | |
echo ${{ secrets.PWD_LINK_FILE }} > pwd_link_file.txt | |
ls -alh | |
cat pwd_link_file.txt | |
python3 vo-scraper.py --disable-hints --hide-progress-bar --quality lowest --latest --file pwd_link_file.txt | |
echo $(sha1sum Lecture\ Recordings/Introduction\ to\ Machine\ Learning/2020-05-27\ -\ Tutorial_360p-1898f0cc.mp4) | grep -q 1b5a1aff3053afd6e700c69d4075aa94aa1daef0 |