Skip to content

upgrade pip in docker file #1016

upgrade pip in docker file

upgrade pip in docker file #1016

Workflow file for this run

name: Will it blend?
on: [push]
jobs:
type-checking:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8','3.11']
name: Type Checking + Linting ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ssh-key: ${{ secrets.I18N_SUBMODULE_GH_ACTIONS_PULL }}
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- uses: actions/cache@v3
id: cache
with:
path: ~/venv
key: ${{ matrix.os }}-pip-lint-${{ hashfiles('requirements.txt') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv
. ~/venv/bin/activate
pip install flake8
pip install -r requirements.txt
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Check pyright
run: |
npm install pyright
cd "$GITHUB_WORKSPACE"
source ~/venv/bin/activate
npx pyright --venv-path ~/venv
- name: Lint with flake8
run: |
. ~/venv/bin/activate
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The Github editor is 127 chars wide
flake8 . --count --statistics --config=./setup.cfg
build:
runs-on: ${{ matrix.os }}
name: Launch check os ${{ matrix.os }}, Python ${{ matrix.python-version }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.I18N_SUBMODULE_GH_ACTIONS_PULL }}
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements.txt
- uses: actions/cache@v3
id: cache
with:
path: ~/venv
key: ${{ matrix.os }}-pip-pytest-${{ hashfiles('requirements.txt') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv
. ~/venv/bin/activate
pip install pytest
pip install -r requirements.txt
- name: Install google key for translations
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_CERT_URL: ${{ secrets.CLIENT_CERT_URL }}
run: |
. ~/venv/bin/activate
if ! [ -f friday-trans-key.json ]; then python create_trans_key.py; fi
if [ -f friday-trans-key.json ]; then printf "File created"; fi
- name: Test with pytest
env:
DBHOSTNAME: ${{ secrets.DBHOSTNAME }}
DBUSERNAME: ${{ secrets.DBUSERNAME }}
DBUSERNAMECANARY: ${{ secrets.DBUSERNAMECANARY }}
DBUSERNAMELOCAL: ${{ secrets.DBUSERNAMELOCAL }}
DBPASSWORD: ${{ secrets.DBPASSWORD }}
DBPASSWORDCANARY: ${{ secrets.DBPASSWORDCANARY }}
DBPASSWORDLOCAL: ${{ secrets.DBPASSWORDLOCAL }}
DBDATABASE: ${{ secrets.DBDATABASE }}
DBDATABASECANARY: ${{ secrets.DBDATABASECANARY }}
DBDATABASELOCAL: ${{ secrets.DBDATABASELOCAL }}
TOKENTEST: ${{ secrets.TOKENTEST }}
DBLWEBHOOKPASS: ${{ secrets.DBLWEBHOOKPASS }}
WEBHOOKSPAMID: ${{ secrets.WEBHOOKSPAMID }}
WEBHOOKISSUESID: ${{ secrets.WEBHOOKISSUESID }}
WEBHOOKINFOID: ${{ secrets.WEBHOOKINFOID }}
WEBHOOKERRORSID: ${{ secrets.WEBHOOKERRORSID }}
WEBHOOKCHATID: ${{ secrets.WEBHOOKCHATID }}
WEBHOOKJOINID: ${{ secrets.WEBHOOKJOINID }}
WEBHOOKSPAMTOKEN: ${{ secrets.WEBHOOKSPAMTOKEN }}
WEBHOOKISSUESTOKEN: ${{ secrets.WEBHOOKISSUESTOKEN }}
WEBHOOKINFOTOKEN: ${{ secrets.WEBHOOKINFOTOKEN }}
WEBHOOKERRORSTOKEN: ${{ secrets.WEBHOOKERRORSTOKEN }}
WEBHOOKCHATTOKEN: ${{ secrets.WEBHOOKCHATTOKEN }}
WEBHOOKJOINTOKEN: ${{ secrets.WEBHOOKJOINTOKEN }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
CLIENT_EMAIL: ${{ secrets.CLIENT_EMAIL }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_CERT_URL: ${{ secrets.CLIENT_CERT_URL }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
REDDITCLIENTID: ${{ secrets.REDDITCLIENTID }}
REDDITCLIENTSECRET: ${{ secrets.REDDITCLIENTSECRET }}
REDDITPASSWORD: ${{ secrets.REDDITPASSWORD }}
APIREQUESTS: ${{ secrets.APIREQUESTS }}
OPENAI: ${{ secrets.OPENAI }}
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
run: |
. ~/venv/bin/activate
if [ -f friday-trans-key.json ]; then printf "Google file here"; fi
pytest test_will_it_blend.py tests_offline/