Skip to content

Merge pull request #411 from yaal-coop/fix-admin-redirection-after-de… #1239

Merge pull request #411 from yaal-coop/fix-admin-redirection-after-de…

Merge pull request #411 from yaal-coop/fix-admin-redirection-after-de… #1239

name: Check local run
on:
pull_request:
branches:
- production
- main
push:
branches:
- production
- main
jobs:
test-local:
name: Run unit tests
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
strategy:
matrix:
python:
- '3.14'
- '3.13'
- '3.12'
- '3.11'
- '3.10'
database:
- sqlite
- postgresql
steps:
- name: Setup git
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python }}
- name: Install PostgreSQL binaries
if: matrix.database == 'postgresql'
run: |
sudo apt-get update
sudo apt-get install -y postgresql
sudo systemctl stop postgresql
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
- name: Install dependencies
run: uv sync --group dev
- name: Run tests with ${{ matrix.database }}
run: uv run pytest --db=${{ matrix.database }}
healthy-containers:
name: Check containers run
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- name: Setup git
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Dump docker version
run: docker --version
- name: Create shared BBB network
run: docker network create bbb-shared
- name: Run all containers
run: ENV_FILE_OVERRIDE=web.env.example docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.test.yml up -d --renew-anon-volumes
id: compose-up
- name: Debug container status on failure
if: steps.compose-up.outcome == 'failure'
run: |
echo "=== Container status ==="
docker ps -a
echo ""
echo "=== Nextcloud logs ==="
docker logs nc 2>&1 || echo "Container nc not found"
echo ""
echo "=== Nextcloud healthcheck details ==="
docker inspect nc --format='{{json .State.Health}}' 2>/dev/null | jq . || echo "No healthcheck info"
echo ""
echo "=== All container logs ==="
docker compose -f docker-compose.yml -f docker-compose.test.yml logs
exit 1
- name: Check postgres health
run: /bin/bash healthcheck.sh db 60
- name: Check keycloak health
run: /bin/bash healthcheck.sh kc 60
- name: Check nextcloud health
run: /bin/bash healthcheck.sh nc 60
- name: Check broker health
run: /bin/bash healthcheck.sh broker 60
- name: Check worker health
run: /bin/bash healthcheck.sh worker 60
- name: Check B3Desk health
run: /bin/bash healthcheck.sh web 60
- name: Check tokenmock health and token content
run: /bin/bash healthcheck.sh id 60