4 Commits

Author SHA1 Message Date
fdf8d65310 ci: trigger dev_tests
Some checks failed
CI/CD Pipeline / dev_tests (push) Failing after 2s
CI/CD Pipeline / deploy (push) Has been skipped
CI/CD Pipeline / promote_stable (push) Has been skipped
2026-02-19 18:17:37 +01:00
c2140b4493 shel test
Some checks failed
CI/CD Pipeline / dev_tests (push) Failing after 2s
CI/CD Pipeline / deploy (push) Has been skipped
CI/CD Pipeline / promote_stable (push) Has been skipped
2026-02-18 23:14:46 +01:00
652cf8bd6a fix dev CI checkout without node action
Some checks failed
CI/CD Pipeline / test (push) Failing after 3s
CI/CD Pipeline / deploy (push) Has been skipped
CI/CD Pipeline / promote_stable (push) Has been skipped
2026-02-18 23:08:01 +01:00
5fdc0d45e3 run bats on dev and enforce php requirement status in ACP
Some checks failed
CI/CD Pipeline / test (push) Failing after 4s
CI/CD Pipeline / deploy (push) Has been skipped
CI/CD Pipeline / promote_stable (push) Has been skipped
2026-02-18 22:57:19 +01:00
2 changed files with 27 additions and 12 deletions

View File

@@ -3,23 +3,28 @@ run-name: ${{ gitea.event.head_commit.message }}
on: on:
push: push:
branches: branches:
- dev
- master - master
jobs: jobs:
test: dev_tests:
if: gitea.ref_name == 'dev'
runs-on: debian-latest runs-on: debian-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 run: |
git clone --quiet --depth=1 --branch=${{ gitea.ref_name }} ${{ gitea.server_url }}/${{ gitea.repository }} repo
- name: Install Bats - name: Install Bats
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y bats sudo apt-get install -y bats
- name: Run Shell Tests - name: Run Shell Tests
run: bats tests/shell/git_update.bats run: |
cd repo
bats tests/shell/git_update.bats
deploy: deploy:
if: gitea.ref_name == 'master'
runs-on: self-hosted runs-on: self-hosted
needs: test
steps: steps:
- name: Custom Checkout - name: Custom Checkout
env: env:
@@ -43,6 +48,7 @@ jobs:
rm .vault_pass.txt rm .vault_pass.txt
promote_stable: promote_stable:
if: gitea.ref_name == 'master'
runs-on: self-hosted runs-on: self-hosted
needs: deploy needs: deploy
steps: steps:

View File

@@ -63,7 +63,6 @@ const StatusIcon = ({ status = 'bad', tooltip }) => {
} }
function Acp({ isAdmin }) { function Acp({ isAdmin }) {
const forcedMinPhpForTesting = '>=8.5'
const { t } = useTranslation() const { t } = useTranslation()
const { roles: authRoles } = useAuth() const { roles: authRoles } = useAuth()
const canManageFounder = authRoles.includes('ROLE_FOUNDER') const canManageFounder = authRoles.includes('ROLE_FOUNDER')
@@ -470,11 +469,21 @@ function Acp({ isAdmin }) {
} }
const cliDefaultPhpIsSufficient = useMemo(() => { const cliDefaultPhpIsSufficient = useMemo(() => {
const minimum = parseMinPhpConstraint(systemStatus?.min_versions?.php)
const current = normalizeSemver(systemStatus?.php_default_version) const current = normalizeSemver(systemStatus?.php_default_version)
const minimum = parseMinPhpConstraint(forcedMinPhpForTesting || systemStatus?.min_versions?.php) if (!minimum) return true
if (!current || !minimum) return false if (!current) return false
return compareSemver(current, minimum) >= 0 return compareSemver(current, minimum) >= 0
}, [systemStatus, forcedMinPhpForTesting]) }, [systemStatus])
const phpSelectedIsSufficient = useMemo(() => {
if (!systemStatus?.php_selected_ok) return false
const minimum = parseMinPhpConstraint(systemStatus?.min_versions?.php)
const current = normalizeSemver(systemStatus?.php_selected_version)
if (!minimum) return true
if (!current) return false
return compareSemver(current, minimum) >= 0
}, [systemStatus])
const systemChecks = useMemo(() => { const systemChecks = useMemo(() => {
if (!systemStatus) return [] if (!systemStatus) return []
@@ -483,9 +492,9 @@ function Acp({ isAdmin }) {
id: 'php', id: 'php',
label: 'PHP', label: 'PHP',
path: systemStatus.php_selected_path || '—', path: systemStatus.php_selected_path || '—',
min: forcedMinPhpForTesting || systemStatus.min_versions?.php || '—', min: systemStatus.min_versions?.php || '—',
current: systemStatus.php_selected_version || '—', current: systemStatus.php_selected_version || '—',
status: systemStatus.php_selected_ok ? 'ok' : 'bad', status: phpSelectedIsSufficient ? 'ok' : 'bad',
}, },
{ {
id: 'composer', id: 'composer',
@@ -563,7 +572,7 @@ function Acp({ isAdmin }) {
status: systemStatus.updates_writable ? 'ok' : 'bad', status: systemStatus.updates_writable ? 'ok' : 'bad',
}, },
] ]
}, [systemStatus, t]) }, [phpSelectedIsSufficient, systemStatus, t])
const visibleSystemChecks = useMemo(() => { const visibleSystemChecks = useMemo(() => {
const visibilityBySection = { const visibilityBySection = {
@@ -3906,7 +3915,7 @@ function Acp({ isAdmin }) {
)} )}
<Form.Text className="bb-muted"> <Form.Text className="bb-muted">
Minimum required PHP (from composer.json):{' '} Minimum required PHP (from composer.json):{' '}
{(forcedMinPhpForTesting || systemStatus?.min_versions?.php) || 'unknown'}. Use a custom binary {systemStatus?.min_versions?.php || 'unknown'}. Use a custom binary
on like php84. On KeyHelp setups use e.g. `keyhelp-php84`. on like php84. On KeyHelp setups use e.g. `keyhelp-php84`.
</Form.Text> </Form.Text>
</Form.Group> </Form.Group>