Skip to content

Feature/access for rdb resource #2643

Feature/access for rdb resource

Feature/access for rdb resource #2643

name: Install Package, Lint Code & Run Tests on Ubuntu
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
install-lint-test-on-ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: # github.com/actions/python-versions/releases
- 3.12
# - 3.13
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: test
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Checkout Repo
uses: actions/checkout@v4 # github.com/actions/checkout
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 # github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: make get-poetry
- name: Install Package & Dependencies
run: make install
- name: Wait for MySQL to be ready
run: |
until mysqladmin ping -h 127.0.0.1 --silent; do
echo "Waiting for MySQL..."
sleep 5
done
- name: Set up Alembic Configuration
run: |
cp .github/workflows/alembic.ini .
- name: Run Migrations
run: |
python -m alembic upgrade head
env:
DATABASE_URL: mysql+pymysql://[email protected]/test
- name: Lint Code
run: make lint
- name: Run Tests
run: make test
env:
LEPTON_API_KEY: ${{ secrets.LEPTON_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
DB_NAME: test