Skip to content

General UI Polish #3400

General UI Polish

General UI Polish #3400

Workflow file for this run

name: Server
on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]
jobs:
linters:
name: "Server: Linters 📝"
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.3.2"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: 🔧 poetry install
working-directory: ./server
run: poetry install --no-root
- uses: actions/cache@v3
with:
path: |
server/.mypy_cache
key: mypy-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ github.sha }}
restore-keys: |
mypy-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.poetry-version }}-
mypy-${{ runner.os }}-${{ matrix.python-version }}-
mypy-${{ runner.os }}-
mypy-
- name: 🐶 Lint Server (ruff)
working-directory: ./server
run: poetry run task lint_check
- name: 🛟 Type Check Server (mypy)
working-directory: ./server
run: poetry run task lint_types
test:
name: "Server: Tests 🐍"
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.3.2"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
services:
postgres:
image: postgres:15.1-bullseye
env:
POSTGRES_USER: polar
POSTGRES_PASSWORD: polar
POSTGRES_DB: polar_test
POSTGRES_PORT: 5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redislabs/redismod
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: 🔧 poetry install
working-directory: ./server
run: poetry install --no-root
- uses: actions/cache@v3
with:
path: |
server/.pytest_cache
key: pytest-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ github.sha }}
restore-keys: |
pytest-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.poetry-version }}-
pytest-${{ runner.os }}-${{ matrix.python-version }}-
pytest-${{ runner.os }}-
pytest-
- name: ⚗️ alembic migrate
working-directory: ./server
env:
POLAR_ENV: testing
run: poetry run task db_migrate
- name: ⚗️ alembic check
working-directory: ./server
env:
POLAR_ENV: testing
run: poetry run alembic check
- name: 🐍 Run tests (pytest)
working-directory: ./server
run: poetry run pytest