Pull MinIO from the Gitea-mirrored pgsty image after upstream Hub/Quay removal.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Generic single-product CI caller — copy into .gitea/workflows/ci.yml and rename paths.
|
||||
# Requires infra/ci-workflows@v1 (collaborative owners must include this repo's owner).
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "web/**"
|
||||
- "MyApp.sln"
|
||||
- ".gitea/workflows/**"
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "src/**"
|
||||
- "web/**"
|
||||
- "MyApp.sln"
|
||||
- ".gitea/workflows/**"
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
uses: infra/ci-workflows/.gitea/workflows/dotnet8-ci.yml@v1
|
||||
with:
|
||||
working_directory: .
|
||||
solution: MyApp.sln
|
||||
postgres_db: myapp_test
|
||||
isolated_test_projects: |
|
||||
tests/MyApp.UnitTests/MyApp.UnitTests.csproj
|
||||
test_projects: |
|
||||
tests/MyApp.IntegrationTests/MyApp.IntegrationTests.csproj
|
||||
test_env: |
|
||||
Jwt__SigningKey=ci-test-jwt-secret-at-least-32-bytes-long!!
|
||||
|
||||
frontend:
|
||||
uses: infra/ci-workflows/.gitea/workflows/node-ci.yml@v1
|
||||
with:
|
||||
working_directory: web
|
||||
node_version: "22"
|
||||
lint_command: npm run lint && npm run typecheck
|
||||
extra_check_command: npm test
|
||||
build_command: npx vite build
|
||||
build_env: |
|
||||
VITE_API_BASE_URL=
|
||||
@@ -0,0 +1,112 @@
|
||||
# Generic monorepo CI caller — path map is always repo-specific; keep this job local.
|
||||
# Pin @v1. Until node-service-ci is tagged live, the node-service job stays in-repo
|
||||
# and uses CICD/scripts/start-job-sidecars.sh (Docker socket required).
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "backend/**"
|
||||
- "web/**"
|
||||
- "api-service/**"
|
||||
- ".gitea/workflows/**"
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "backend/**"
|
||||
- "web/**"
|
||||
- "api-service/**"
|
||||
- ".gitea/workflows/**"
|
||||
|
||||
jobs:
|
||||
# Stays local: repo-specific path map + needs fetch-depth: 0.
|
||||
# Keep actions/checkout@v4 here until builtin:checkout is proven with fetch-depth: 0.
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
api_service: ${{ steps.filter.outputs.api_service }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Detect changed stacks
|
||||
id: filter
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then
|
||||
BASE="origin/${GITHUB_BASE_REF}"
|
||||
git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}" 2>/dev/null \
|
||||
|| git fetch --no-tags origin "${GITHUB_BASE_REF}"
|
||||
RANGE="${BASE}...HEAD"
|
||||
elif [ -n "${GITHUB_EVENT_BEFORE:-}" ] \
|
||||
&& [ "${GITHUB_EVENT_BEFORE}" != "0000000000000000000000000000000000000000" ]; then
|
||||
RANGE="${GITHUB_EVENT_BEFORE}...HEAD"
|
||||
else
|
||||
RANGE="HEAD~1...HEAD"
|
||||
fi
|
||||
changed="$(git diff --name-only ${RANGE} 2>/dev/null || git diff --name-only HEAD)"
|
||||
backend=false; frontend=false; api_service=false
|
||||
if echo "${changed}" | grep -qE '^\.gitea/workflows/'; then
|
||||
backend=true; frontend=true; api_service=true
|
||||
else
|
||||
echo "${changed}" | grep -qE '^backend/' && backend=true || true
|
||||
echo "${changed}" | grep -qE '^web/' && frontend=true || true
|
||||
echo "${changed}" | grep -qE '^api-service/' && api_service=true || true
|
||||
fi
|
||||
{
|
||||
echo "backend=${backend}"
|
||||
echo "frontend=${frontend}"
|
||||
echo "api_service=${api_service}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
backend:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.backend == 'true'
|
||||
uses: infra/ci-workflows/.gitea/workflows/dotnet8-ci.yml@v1
|
||||
with:
|
||||
working_directory: backend
|
||||
solution: MyApp.sln
|
||||
postgres_db: myapp_test
|
||||
test_projects: |
|
||||
tests/MyApp.IntegrationTests/MyApp.IntegrationTests.csproj
|
||||
|
||||
frontend:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
uses: infra/ci-workflows/.gitea/workflows/node-ci.yml@v1
|
||||
with:
|
||||
working_directory: web
|
||||
node_version: "22"
|
||||
lint_command: npm run lint && npm run typecheck
|
||||
build_command: npx vite build
|
||||
|
||||
# Prefer uses: infra/ci-workflows/.../node-service-ci.yml@v1 once tagged.
|
||||
# Until then: local job + start-job-sidecars.sh (do NOT use RabbitMQ as services:).
|
||||
api-service:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.api_service == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: builtin:checkout
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: npm
|
||||
cache-dependency-path: api-service/package-lock.json
|
||||
- name: Start sidecars
|
||||
run: bash CICD/scripts/start-job-sidecars.sh
|
||||
# Or: bash CICD/scripts/start-job-sidecars.sh if you copied the kit to ./CICD
|
||||
- name: Install / migrate / test
|
||||
working-directory: api-service
|
||||
run: |
|
||||
npm ci
|
||||
npm run migrate
|
||||
npm test -- --runInBand --forceExit
|
||||
- name: Stop sidecars
|
||||
if: always()
|
||||
run: |
|
||||
docker rm -f "${CI_PG_NAME:-}" "${CI_RMQ_NAME:-}" "${CI_REDIS_NAME:-}" 2>/dev/null || true
|
||||
@@ -0,0 +1,83 @@
|
||||
# What .gitea/workflows/ci.yml becomes once infra/ci-workflows exists and is tagged v1.
|
||||
# STAGED — do not copy into .gitea/workflows/ until that repo is pushed and tagged,
|
||||
# or every run fails to resolve the `uses:` reference.
|
||||
#
|
||||
# 241 lines -> ~75. What stays here is what a reusable workflow cannot take:
|
||||
# the change-detection job needs fetch-depth: 0 and a repo-specific path map.
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
paths:
|
||||
- "GrowthOS/**"
|
||||
- ".gitea/workflows/**"
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths:
|
||||
- "GrowthOS/**"
|
||||
- ".gitea/workflows/**"
|
||||
|
||||
jobs:
|
||||
# Stays local: repo-specific path map, and it needs full history to diff against
|
||||
# the merge base. Keep actions/checkout@v4 here unless the probe proves
|
||||
# builtin:checkout honours fetch-depth: 0 — a silently shallow clone would make
|
||||
# this filter skip real work while the run stays green.
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Detect changed stacks
|
||||
id: filter
|
||||
run: |
|
||||
# ... unchanged from the current ci.yml ...
|
||||
echo "see .gitea/workflows/ci.yml for the body"
|
||||
|
||||
backend:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.backend == 'true'
|
||||
uses: infra/ci-workflows/.gitea/workflows/dotnet8-ci.yml@v1
|
||||
with:
|
||||
working_directory: GrowthOS
|
||||
solution: GrowthOS.sln
|
||||
postgres_db: growth_os_test
|
||||
# Unit tests are InMemory. They must not see the service Postgres, or
|
||||
# AppDbContextFactory connects to it and retries until the runner thrashes.
|
||||
isolated_test_projects: |
|
||||
tests/GrowthOS.UnitTests/GrowthOS.UnitTests.csproj
|
||||
test_projects: |
|
||||
tests/GrowthOS.IntegrationTests/GrowthOS.IntegrationTests.csproj
|
||||
tests/GrowthOS.AgentEvals/GrowthOS.AgentEvals.csproj
|
||||
test_env: |
|
||||
Jwt__SigningKey=ci-test-jwt-secret-at-least-32-bytes-long!!
|
||||
Gitea__DryRun=true
|
||||
Gitea__BaseUrl=
|
||||
Gitea__Token=
|
||||
pre_build_command: |
|
||||
set -euo pipefail
|
||||
venv=/tmp/growth-seed
|
||||
if ! python3 -m venv "$venv"; then
|
||||
(sudo apt-get update -qq && sudo apt-get install -y -qq python3-venv) \
|
||||
|| (apt-get update -qq && apt-get install -y -qq python3-venv)
|
||||
python3 -m venv "$venv"
|
||||
fi
|
||||
"$venv/bin/pip" install --quiet --disable-pip-version-check pyyaml
|
||||
"$venv/bin/python" GrowthOS/scripts/sync-growth-memory-seed.py --check
|
||||
|
||||
frontend:
|
||||
needs: changes
|
||||
if: needs.changes.outputs.frontend == 'true'
|
||||
uses: infra/ci-workflows/.gitea/workflows/node-ci.yml@v1
|
||||
with:
|
||||
working_directory: GrowthOS/web
|
||||
node_version: "22"
|
||||
lint_command: npm run lint
|
||||
extra_check_command: node scripts/check-prod-routing.mjs
|
||||
build_command: npx vite build
|
||||
build_env: |
|
||||
VITE_API_BASE_URL=
|
||||
Reference in New Issue
Block a user