feat(youtube_downloader.py): Implement YoutubeDownloader class functionality #52
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: Lint | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Build Docker image | |
run: docker build -t focusfeed . | |
#- name: Run tests in Docker | |
# run: docker run focusfeed poetry run pytest tests/ | |
- name: Format with Ruff | |
run: docker run focusfeed poetry run ruff format . --check | |
- name: Lint with Ruff | |
run: docker run focusfeed poetry run ruff check . | |
- name: Notify result | |
if: always() | |
env: | |
NTFY_TOPIC: ${{ secrets.NTFY_TOPIC }} | |
run: | | |
if [ ${{ job.status }} == 'success' ]; then | |
curl -H "Title: Lint Passed" -d "Linting passed for PR #${{ github.event.pull_request.number }}" ntfy.sh/$NTFY_TOPIC | |
else | |
LINT_ERRORS=$(cat lint_results.txt | head -n 5) | |
curl -H "Title: Lint Failed" -d "Linting failed for PR #${{ github.event.pull_request.number }}. First few errors: $LINT_ERRORS" ntfy.sh/$NTFY_TOPIC | |
fi |