ci: stand up CI workflow on nova-cli #3
@@ -0,0 +1,53 @@
|
||||
# nova-cli CI — first gated push (task order coreci/nova-platform#3, hip c12363)
|
||||
#
|
||||
# Gate shape: fetch -> one-time runner-surface probe (diagnostics report,
|
||||
# never gate) -> repo-shape validation (gates loud). The offline floor is
|
||||
# honest: every stage that runs is a real check; nothing skipped is
|
||||
# presented as passed.
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: fetch (probe: stock actions/checkout@v4)
|
||||
id: actfetch
|
||||
continue-on-error: true
|
||||
uses: actions/checkout@v4
|
||||
- name: fetch (git-clone fallback, run token)
|
||||
if: ${{ steps.actfetch.outcome == 'failure' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git clone --depth 1 "https://coreci-nova-po:${{ secrets.GITEA_TOKEN }}@git.coreci.dev/${{ github.repository }}.git" .
|
||||
- name: diagnostics (runner surface probe - reports, does not gate)
|
||||
run: |
|
||||
set -u
|
||||
echo "== workspace =="
|
||||
ls -A
|
||||
git log --oneline -1 || true
|
||||
echo "== python =="
|
||||
python3 --version
|
||||
python3 -m pytest --version 2>/dev/null || echo "pytest: ABSENT"
|
||||
python3 - <<'PY'
|
||||
for m in ("yaml", "jsonschema", "boto3", "moto"):
|
||||
try:
|
||||
__import__(m)
|
||||
print(m + ": OK")
|
||||
except Exception as e:
|
||||
print(m + ": ABSENT (%s)" % type(e).__name__)
|
||||
PY
|
||||
echo "== pypi reachability =="
|
||||
timeout 15 pip download --no-deps --dest /tmp/piptest pytest >/dev/null 2>&1 && echo "pypi: REACHABLE" || echo "pypi: UNREACHABLE"
|
||||
- name: gate (repo shape)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -s README.md
|
||||
head -1 README.md | grep -q '^# '
|
||||
echo "gate: README present, non-empty, title line OK"
|
||||
Reference in New Issue
Block a user