Skip to content

prepare oauth and user #408

prepare oauth and user

prepare oauth and user #408

Workflow file for this run

---
name: Python application
on: [push]
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.10.2]
poetry-version: [1.1.13]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libtag1-dev postgresql-server-dev-all ffmpeg vlc
poetry install
- name: restructured text Linting
run: |
poetry run rst-lint README.rst
- name: Pylint Linting
run: |
poetry run pylint musicbot tests
- name: Flake8 Linting
run: |
poetry run flake8 --config .flake8 musicbot tests
- name: MyPy Static type checking
run: |
poetry run mypy musicbot tests
- name: Test with pytest
env:
MB_SPOTIFY_CACHE: ${{ secrets.MB_SPOTIFY_CACHE }}
MB_SPOTIFY_CLIENT_ID: ${{ secrets.MB_SPOTIFY_CLIENT_ID }}
MB_SPOTIFY_CLIENT_SECRET: ${{ secrets.MB_SPOTIFY_CLIENT_SECRET }}
run: |
echo -n "$MB_SPOTIFY_CACHE" > $HOME/.spotify_cache
MB_SPOTIFY_CACHE_PATH=$HOME/.spotify_cache poetry run pytest
- name: Build package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
poetry build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}