Repository navigation
feat: add workspace preferences and user avatars #34
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Validate configuration | |
| run: | | |
| docker compose config --quiet | |
| jq empty src/includes/i18n/main_en_US.json | |
| jq empty src/includes/i18n/main_pt_BR.json | |
| - name: Build application image | |
| run: docker compose build app | |
| - name: Start development stack | |
| run: docker compose up --detach --wait | |
| - name: Verify application and dependencies | |
| run: | | |
| retry_curl() { | |
| curl --fail --silent --show-error \ | |
| --retry 12 --retry-delay 5 --retry-all-errors \ | |
| --connect-timeout 5 --max-time 15 "$@" | |
| } | |
| assert_contains() { | |
| local label="$1" | |
| local file="$2" | |
| local expected="$3" | |
| if ! grep --quiet "$expected" "$file"; then | |
| echo "::error title=${label} verification failed::Expected '${expected}' in ${file}" | |
| return 1 | |
| fi | |
| echo "${label}: OK" | |
| } | |
| retry_curl http://localhost:8090/health/live > /dev/null | |
| echo "Liveness endpoint: OK" | |
| retry_curl http://localhost:8090/health/ready > /dev/null | |
| echo "Readiness endpoint: OK" | |
| retry_curl --output /tmp/tabor-lane-home.html http://localhost:8090/ | |
| assert_contains "Landing page" /tmp/tabor-lane-home.html "Tabor Lane" | |
| retry_curl --output /tmp/tabor-lane-login.html http://localhost:8090/login | |
| assert_contains "Login page" /tmp/tabor-lane-login.html "Tabor Lane" | |
| app_status="$(retry_curl --output /dev/null --write-out '%{http_code}' http://localhost:8090/app)" | |
| if [[ "$app_status" != "302" ]]; then | |
| echo "::error title=Authentication redirect failed::Expected 302 from /app, received ${app_status}" | |
| exit 1 | |
| fi | |
| echo "Authentication redirect: OK" | |
| docker compose exec -T postgres psql -U tabor_lane -d tabor_lane \ | |
| -c "SELECT COUNT(*) FROM workspace;" | |
| docker compose run --rm minio-init | |
| - name: Verify signup, workspace ownership and live cards | |
| run: bash scripts/smoke-test.sh | |
| - name: Show logs on failure | |
| if: failure() | |
| run: docker compose logs --no-color | |
| - name: Stop stack | |
| if: always() | |
| run: docker compose down --volumes | |
| container: | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Validate multi-platform build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |