SPB Git

Repository Public MIT

ci.sh 3.0 KB 59 lines shellscript

1#!/usr/bin/env bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : ORIX Astra8# File             : Scripts/ci.sh9# Module           : Scripts10# Repository       : https://git.spboucher.ai/orix-astra11# Created          : 2026-11-2212# Last Modified    : 2026-11-2213#14# Author           : Simon-Pierre Boucher15# Position         : Professor of Finance16# Institution      : Université du Québec en Outaouais (UQO)17# Organization     : SP Boucher18# Website          : https://spboucher.ai19# Git              : https://git.spboucher.ai20#21# Preferred Contact: support@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin   : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License          : Proprietary, all rights reserved (see license file)32# License File     : LICENSE33#34# Do not embed credentials, private keys, access tokens,35# certificates or confidential personal information.36#37# =============================================================================38# END OF SP BOUCHER SOURCE HEADER39# =============================================================================4041# Usage: Scripts/ci.sh            (run before every push; the forge has no hosted runners, so this is the project's CI entry point)42# Runs, in order: secret scan, pure-Swift unit and contract tests, local-runtime tests, Debug build for the simulator, UI tests.43# Set CI_SKIP_UI=1 to skip the simulator steps (for example on a machine without the iOS runtime).44set -euo pipefail45cd "$(dirname "$0")/.."46mkdir -p build/logs47echo "== secret scan";            bash Scripts/secret-scan.sh48echo "== unit and contract tests"; ASTRA_NO_MLX=1 swift test --disable-keychain --scratch-path build/spm-main 2>&1 | tee build/logs/ci-test.log | grep -E "✘|Test run with|error:" || true49if grep -qE "✘|error:" build/logs/ci-test.log; then echo "unit tests FAILED"; exit 1; fi50echo "== local runtime tests";    ASTRA_NO_UI=1 swift test --disable-keychain --scratch-path build/spm-local --filter AstraLocalTests 2>&1 | tee build/logs/ci-local.log | grep -E "✘|Test run with|error:" || true51if grep -qE "✘|error:" build/logs/ci-local.log; then echo "local runtime tests FAILED"; exit 1; fi52if [ "${CI_SKIP_UI:-0}" != 1 ]; then53  echo "== simulator build";      Scripts/build.sh debug54  echo "== UI tests";             Scripts/build.sh uitest | tee build/logs/ci-ui.log55  grep -q "TEST SUCCEEDED" build/logs/ci-ui.log || { echo "UI tests FAILED"; exit 1; }56  echo "== secret scan of the built app"; bash Scripts/secret-scan.sh build/dd/Build/Products/Debug-iphonesimulator/ORIXAstra.app | tail -257fi58echo "CI OK"59
Files main
Menu

Theme