name: CI on: pull_request: branches: - main jobs: check: runs-on: shell steps: - name: Typecheck, lint, and test run: | set -e exec 2>&1 BARE="/docker/gitea/gitea/git/repositories/remco/epicnext-cms.git" REF="${{ gitea.sha }}" if [ -z "${REF}" ]; then echo "ERROR: missing gitea.sha" >&2 exit 1 fi WORK="$(mktemp -d /var/tmp/epicnext-ci.XXXXXX)" cleanup() { git -C "${BARE}" worktree remove --force "${WORK}" 2>/dev/null || rm -rf "${WORK}" || true } trap cleanup EXIT echo "--- CI checks (${WORK} @ ${REF}) ---" git config --global --add safe.directory "${BARE}" git -C "${BARE}" worktree remove --force "${WORK}" 2>/dev/null || rm -rf "${WORK}" || true git -C "${BARE}" worktree add --detach "${WORK}" "${REF}" cd "${WORK}" export SKIP_ENV_VALIDATION=1 export ARGON2_MEMORY_SIZE=1024 export ARGON2_ITERATIONS=1 export BCRYPT_ROUNDS=4 pnpm install --frozen-lockfile pnpm prisma:generate pnpm biome:lint pnpm typecheck pnpm test echo "--- CI checks passed ---"