chore: Updated settings.json { python } settings in @observerly/perseus. #116
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: perseus/ci | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "__pycache__" | |
- ".pytest_cache" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: CI/CD Build & Test w/pytest | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
PROJECT_NAME: "Perseus FastAPI" | |
FIRST_SUPERUSER_EMAIL: ${{ secrets.FIRST_SUPERUSER_EMAIL }} | |
FIRST_SUPERUSER_PASSWORD: ${{ secrets.FIRST_SUPERUSER_PASSWORD }} | |
MYSQL_INSTANCE_CONNECTION_NAME: ${{ secrets.MYSQL_INSTANCE_CONNECTION_NAME }} | |
MYSQL_USER: ${{ secrets.MYSQL_USER }} | |
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} | |
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_PASSWORD }} | |
MYSQL_HOST: "db" | |
MYSQL_PORT: "3306" | |
MYSQL_DATABASE: ${{ secrets.MYSQL_DATABASE }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SERVER_NAME: "perseus" | |
SERVER_HOST: "https://perseus.observerly.com" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Environment File | |
run: | | |
touch .env | |
echo PROJECT_NAME=${PROJECT_NAME} >> .env | |
echo FIRST_SUPERUSER_EMAIL=${FIRST_SUPERUSER_EMAIL} >> .env | |
echo FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD} >> .env | |
echo MYSQL_INSTANCE_CONNECTION_NAME=${MYSQL_INSTANCE_CONNECTION_NAME} >> .env | |
echo MYSQL_USER=${MYSQL_USER} >> .env | |
echo MYSQL_PASSWORD=${MYSQL_PASSWORD} >> .env | |
echo MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} >> .env | |
echo MYSQL_HOST=${MYSQL_HOST} >> .env | |
echo MYSQL_PORT=${MYSQL_PORT} >> .env | |
echo MYSQL_DATABASE=${MYSQL_DATABASE} >> .env | |
echo SENTRY_DSN=${SENTRY_DSN} >> .env | |
echo SERVER_NAME=${SERVER_NAME} >> .env | |
echo SERVER_HOST=${SERVER_HOST} >> .env | |
cat .env | |
- name: Docker Compose Build | |
run: docker compose -f local.yml build --build-arg INSTALL_DEV="true" | |
- name: Docker Compose Up | |
run: docker compose -f local.yml up -d | |
- name: Docker Compose Init DB Pre | |
run: docker compose -f local.yml exec api ./scripts/init_db_pre.sh | |
- name: Alembic Upgrade Head (Run Migrations) | |
run: docker compose -f local.yml exec api alembic upgrade head | |
- name: Seed Body (Stars, Galaxies etc) Data | |
run: docker compose -f local.yml exec api ./scripts/init_db_seed.sh | |
- name: Run Pytest Suite | |
run: docker compose -f local.yml exec api pytest |