Files
NODEDC_DEVICE_CORE/.gitea/workflows/ci.yml
T

31 lines
1.2 KiB
YAML

name: Device Core qualification
on:
push:
branches: [main]
workflow_dispatch:
jobs:
qualify:
runs-on: nodedc-node22-build
timeout-minutes: 45
steps:
- name: Check the exact pushed commit
env:
SOURCE_COMMIT: ${{ gitea.sha }}
run: |
set -eu
python3 -c 'import os,re; assert re.fullmatch("[0-9a-f]{40}", os.environ["SOURCE_COMMIT"]), "full commit SHA required"'
job_root=$(mktemp -d)
trap 'rm -rf "$job_root"' EXIT
source_root="$job_root/NODEDC_DEVICE_CORE"
mkdir "$source_root"
git -C "$source_root" init --quiet
git -C "$source_root" remote add origin https://git.dcserve.ru/SILVER/NODEDC_DEVICE_CORE.git
git -C "$source_root" fetch --quiet --depth=1 origin "$SOURCE_COMMIT"
git -C "$source_root" checkout --quiet --detach FETCH_HEAD
python3 "$source_root/infra/ci/qualify.py" fetch-dependencies --commit "$SOURCE_COMMIT"
python3 "$source_root/infra/ci/qualify.py" check --commit "$SOURCE_COMMIT" --report "$job_root/qualification.json"
# Production activation is separate: this job has no production access.
# Do not label a successful qualification as a successful deployment.