Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add asynchronous Platzi downloader #9

Merged
merged 7 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Continuous Delivery

on:
push:
branches:
- master
paths-ignore:
- '*.md'

jobs:
release:
runs-on: ubuntu-latest
concurrency: release

permissions:
id-token: write
contents: write

steps:
- name: Setup | Checkout Repository at workflow sha
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}

- name: Setup | Force correct release branch on workflow sha
run: |
git checkout -B ${{ github.ref_name }} ${{ github.sha }}

- name: Action | Semantic Version Release
id: release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.PLATZI_GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "[email protected]"

- name: Publish | Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'

- name: Publish | Upload to GitHub Release Assets
uses: python-semantic-release/[email protected]
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.PLATZI_GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test

on:
push:
paths-ignore:
- '*.md'

branches:
- develop

pull_request:
paths-ignore:
- '*.md'

jobs:
test:
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Setup | Checkout Repository
uses: actions/checkout@v4

- name: Install Poetry
shell: bash
run: pipx install poetry

- name: Install FFmpeg
uses: AnimMouse/setup-ffmpeg@v1
with:
version: master

- name: Setup | Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install Dependencies
run: poetry install --with=dev

- name: Install Playwright Browsers
run: poetry run python -m playwright install --with-deps

- name: Lint with Ruff
run: poetry run ruff check --output-format=github .

- name: Run Tests with Pytest
run: poetry run pytest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
*.json
bin/
downloads/
.tmp/
*.mp4
*.ts
*.mhtml

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
73 changes: 0 additions & 73 deletions downloader.py

This file was deleted.

2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mypy]
ignore_missing_imports = True
137 changes: 0 additions & 137 deletions platzi.py

This file was deleted.

Loading