Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomy0000000 committed Jul 22, 2022
2 parents 26fb8ef + f2f7918 commit add527a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 53 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
if: ${{ github.event_name != 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Docker Meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: |
${{ github.repository }}
Expand Down Expand Up @@ -51,5 +51,5 @@ jobs:
script: |
cd tubee
docker pull tomy0000000/tubee:latest
docker-compose up --detach
docker compose up --detach
docker network connect nginx_default tubee_app
42 changes: 21 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,44 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version-file: ".python-version"
cache: "poetry"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry env use $(cat '.python-version')
poetry install --no-interaction --no-ansi
- name: Testing
run: |
flask test --coverage
run: poetry run flask test --coverage

- name: Report coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

license:
name: License Scan
runs-on: ubuntu-latest
if: ${{ github.event_path == 'pyproject.toml' || github.event_path == 'poetry.lock' }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Dependencies
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
python-version-file: ".python-version"
cache: "poetry"

- name: Export requirements.txt
run: |
Expand All @@ -81,11 +81,11 @@ jobs:
&& (needs.license.result == 'success' || needs.license.result == 'skipped')
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Docker Meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: |
${{ github.repository }}
Expand Down Expand Up @@ -118,5 +118,5 @@ jobs:
script: |
cd tubee-beta
docker pull tomy0000000/tubee:edge
docker-compose up --detach
docker network connect nginx_default tubee_app_beta
docker compose up --detach
docker network connect nginx_default tubee_beta_app
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Created by https://www.toptal.com/developers/gitignore/api/flask,dotenv
# Edit at https://www.toptal.com/developers/gitignore?templates=flask,dotenv

Expand Down Expand Up @@ -94,7 +93,7 @@ profile_default/
ipython_config.py

# pyenv
.python-version
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -157,7 +156,6 @@ Thumbs.db
# profiling data
.prof


# End of https://www.toptal.com/developers/gitignore/api/flask,dotenv

*.sqlite
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
29 changes: 8 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Tubee

<p align="center">
<img src="tubee/static/favicon.png">
<img src="https://raw.githubusercontent.com/tomy0000000/tubee/main/tubee/static/favicon.png">
<br>
<img width="150" src="tubee/static/img/tubee_text.png">
<img width="150" src="https://raw.githubusercontent.com/tomy0000000/tubee/main/tubee/static/img/tubee_text.png">
<br>
<img src="https://img.shields.io/badge/python-3.9-blue.svg?logo=python" alt="Python Version" />
<a href="https://github.com/tomy0000000/Tubee/actions/workflows/testing.yml">
<img src="https://img.shields.io/github/workflow/status/tomy0000000/Tubee/Test%20latest?logo=GitHub%20Actions" alt="GitHub Workflow Status" />
<img src="https://img.shields.io/badge/python-3.9-blue.svg?color=brightgreen&logo=python&logoColor=white" alt="Python Version: 3.9" />
<a href="https://github.com/tomy0000000/tubee/actions/workflows/test.yml">
<img src="https://img.shields.io/github/workflow/status/tomy0000000/tubee/Test?logo=Github" alt="GitHub Build Status" />
</a>
<a href="https://codecov.io/gh/tomy0000000/Tubee">
<img src="https://codecov.io/gh/tomy0000000/Tubee/branch/main/graph/badge.svg?token=j6pUVAg2Wf" alt="codecov" />
<a href="https://codecov.io/gh/tomy0000000/tubee">
<img src="https://img.shields.io/codecov/c/github/tomy0000000/tubee?color=brightgreen&logo=codecov&logoColor=white&token=j6pUVAg2Wf" alt="Coverage" />
</a>
<br>
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Ftomy0000000%2FTubee?ref=badge_shield">
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftomy0000000%2FTubee.svg?type=shield" alt="LICENSE scan status" />
</a>
<a href="https://github.com/tomy0000000/Tubee/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/tomy0000000/Tubee.svg" alt="MIT liscense" />
<img src="https://img.shields.io/github/license/tomy0000000/Tubee?color=brightgreen" alt="MIT liscense" />
</a>
<br>
<a href="https://github.com/psf/black">
Expand Down Expand Up @@ -52,16 +52,3 @@ Actions that may be executed upon new video being published:
- [LINE Notify](https://notify-bot.line.me)
- Add to user's YouTube playlist
- Download to linked Dropbox folder

## Requirements

- Python 3.7+
- [YouTube Data API](https://developers.google.com/youtube/registering_an_application) authorization credentials in both
- OAuth 2.0 token: used for accessing user information
- API Keys: used for querying public metadata

For additional operation, you might also need

- [Pushover](https://pushover.net/) API Token
- [Line Notify](https://notify-bot.line.me/zh_TW/) Client ID / Client Secret
- [Dropbox](https://www.dropbox.com/developers/apps) App Key / App Secret

0 comments on commit add527a

Please sign in to comment.