mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
93 lines
3.0 KiB
YAML
93 lines
3.0 KiB
YAML
name: Self-Host Tests Smoke
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['master']
|
|
paths:
|
|
- 'docker/**/*'
|
|
|
|
# Cancel old builds on new commit for same workflow + branch/PR
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config: [default, logs, kong, rustfs, kong-rustfs, pgbouncer]
|
|
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: |
|
|
docker/
|
|
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Generate keys
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
cp .env.example .env
|
|
sh utils/generate-keys.sh --update-env
|
|
sh utils/add-new-auth-keys.sh --update-env
|
|
|
|
- name: Start self-hosted Supabase
|
|
shell: bash
|
|
# Ensure all services can be started and healthy with default config
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
yq -i '.services.supavisor.environment.RLIMIT_NOFILE=1024' docker-compose.yml
|
|
if [ "${{ matrix.config }}" = "logs" ]; then
|
|
docker compose -f docker-compose.yml -f docker-compose.logs.yml up --quiet-pull --wait --wait-timeout 180
|
|
elif [ "${{ matrix.config }}" = "kong" ]; then
|
|
docker compose -f docker-compose.yml -f docker-compose.kong.yml up --quiet-pull --wait --wait-timeout 180
|
|
elif [ "${{ matrix.config }}" = "rustfs" ]; then
|
|
docker compose -f docker-compose.yml -f docker-compose.rustfs.yml up --quiet-pull --wait --wait-timeout 180
|
|
elif [ "${{ matrix.config }}" = "kong-rustfs" ]; then
|
|
docker compose -f docker-compose.yml -f docker-compose.kong.yml -f docker-compose.rustfs.yml up --quiet-pull --wait --wait-timeout 180
|
|
elif [ "${{ matrix.config }}" = "pgbouncer" ]; then
|
|
docker compose -f docker-compose.yml -f docker-compose.pgbouncer.yml up --quiet-pull --wait --wait-timeout 180
|
|
else
|
|
docker compose up --quiet-pull --wait --wait-timeout 180
|
|
fi
|
|
|
|
- name: Run container log tests
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
sh tests/test-container-logs.sh
|
|
|
|
- name: Run smoke tests
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
sh tests/test-self-hosted.sh
|
|
|
|
- name: Run API keys and asymmetric auth tests
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
sh tests/test-auth-keys.sh
|
|
|
|
- name: Run S3 protocol tests
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cd docker
|
|
sh tests/test-s3.sh
|