Add 20240729 newsletter #778
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: Pytest | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
run_test: | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04"] | |
python-version: ["3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update libs | |
run: sudo apt-get update | |
- name: Install memcached libs | |
run: sudo apt-get install ca-certificates libmemcached-tools | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Poetry venv | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: poetry-venv-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }} | |
- name: Cache Poetry local | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/pypoetry | |
key: poetry-local-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }} | |
- name: Cache Poetry cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pypoetry | |
key: poetry-cache-${{ matrix.python-version }}${{ hashFiles('**/poetry.lock') }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Install dependencies | |
run: poetry install -v | |
- name: Show packages | |
run: poetry show --tree | |
- name: Create setting.py | |
run: mv setting_sample.py setting.py | |
- name: Run mypy | |
run: PYTHONPATH=./ poetry run mypy ./view/ ./module/ ./models/ ./celery_task/ ./structs/ ./api/ ./main.py | |
- name: Run Testing | |
env: | |
CLIENT_ID: ${{ secrets.TDX_CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.TDX_CLIENT_SECRET }} | |
run: PYTHONPATH=./ poetry run pytest -vv --cov-report=term-missing --cov ./ | |
- name: Run Pylint | |
run: PYTHONPATH=./ poetry run pylint --disable=R0801,E1101,E0611 ./view/ ./module/ ./models/ ./celery_task/ ./structs/ ./api/ ./main.py |