Skip to content

chore(deps): update postgres docker tag to v15.18 #347

chore(deps): update postgres docker tag to v15.18

chore(deps): update postgres docker tag to v15.18 #347

Workflow file for this run

name: Tests
on: push
env:
BOT_CREDENTIALS: example.ru@6d624b45b67f843322ebaa1143132a24@7a1c7744-23c9-4ba9-a7dc-5381f090a52d
REDIS_DSN: redis://localhost:6379/0
POSTGRES_DSN: postgresql://postgres:postgres@localhost:5432/postgres
poetry_version: "2.1.2"
project_name: "async-box-bot"
PROD_SERVER_HOST: "prod.example.com"
DEV_SERVER_HOST: "dev.example.com"
BOTS_REGISTRY_URL: "registry.example.com/bots/"
jobs:
test-image:
name: Test app start
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:15.3-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.0-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install copier
run: |
python -m pip install --upgrade pip
pip install copier==9.15.1 copier-templates-extensions==0.3.2
- name: Test image
env:
REDIS_DSN: ${{ env.REDIS_DSN }}
POSTGRES_DSN: ${{ env.POSTGRES_DSN }}
run: ./.github/scripts/test_image
test-template:
name: Test template
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
services:
postgres:
image: postgres:15.3-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7.0-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install copier
run: |
python -m pip install --upgrade pip
pip install copier==9.15.1 copier-templates-extensions==0.3.2
python -m copier copy --trust --defaults --vcs-ref=HEAD . async-box-bot
- name: Get full Python version
id: full-python-version
run: |
python - <<'PY' >> "$GITHUB_OUTPUT"
import sys
print("version=" + "-".join(str(v) for v in sys.version_info))
PY
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
${{ env.project_name }}/.venv
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
working-directory: ${{ env.project_name }}
run: |
pip install poetry==${{ env.poetry_version }}
poetry config virtualenvs.in-project true
poetry install
- name: Run tests
env:
BOT_CREDENTIALS: example.ru@6d624b45b67f843322ebaa1143132a24@7a1c7744-23c9-4ba9-a7dc-5381f090a52d
REDIS_DSN: redis://localhost:6379/0
POSTGRES_DSN: postgresql://postgres:postgres@localhost:5432/postgres
working-directory: ${{ env.project_name }}
run: |
poetry run ./scripts/test
lint:
name: Lint
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install copier
run: |
python -m pip install --upgrade pip
pip install copier==9.15.1 copier-templates-extensions==0.3.2
python -m copier copy --trust --defaults --vcs-ref=HEAD . async-box-bot
- name: Get full Python version
id: full-python-version
run: |
python - <<'PY' >> "$GITHUB_OUTPUT"
import sys
print("version=" + "-".join(str(v) for v in sys.version_info))
PY
- name: Set up cache
id: cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
${{ env.project_name }}/.venv
key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
working-directory: ${{ env.project_name }}
run: |
pip install poetry==${{ env.poetry_version }}
poetry config virtualenvs.in-project true
poetry install
- name: Run linters
working-directory: ${{ env.project_name }}
run: |
poetry run ./scripts/lint