Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Sanity + Deploy Test Environment

on:
workflow_dispatch:
push:
branches: [aitest]
pull_request:
branches: [aitest]
workflow_run:
workflows:
- Node.js CI
branches: [aitest]
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
JAVA_VERSION: "8"
JAVA_DISTRO: "temurin"

jobs:
build-sanity:
name: mvn compile + test if any (P3 no coverage gate, 06 §4)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRO }}
cache: maven
- name: mvn test (P3: 允许 0 用例,不卡覆盖率;若无 mvnw 则使用系统 PATH 中的 mvn)
shell: bash
run: |
set -euo pipefail
chmod +x mvnw mvnw.cmd 2>/dev/null || true
if [ -x ./mvnw ]; then
./mvnw -B -ntp clean test -DfailIfNoTests=false -Djacoco.skip=true
else
mvn -B -ntp clean test -DfailIfNoTests=false -Djacoco.skip=true
fi

deploy-test:
name: deploy-test (self-hosted clklog-ce-runner @ 10.10.222.66, only on aitest branch)
needs: [build-sanity]
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/aitest'
runs-on: [self-hosted, clklog-ce-runner]
steps:
- uses: actions/checkout@v4
- name: Deploy
run: |
echo "Runner: $RUNNER_NAME"
hostname
uname -a
whoami