This commit is contained in:
parent
90be0e4a80
commit
172ff7e011
@ -10,6 +10,7 @@ steps:
|
|||||||
# 自动检测是否存在 Java (pom.xml)
|
# 自动检测是否存在 Java (pom.xml)
|
||||||
- name: java-build
|
- name: java-build
|
||||||
image: maven:3.9-eclipse-temurin
|
image: maven:3.9-eclipse-temurin
|
||||||
|
pull: false
|
||||||
commands:
|
commands:
|
||||||
- if [ -f pom.xml ]; then mvn clean compile; fi
|
- if [ -f pom.xml ]; then mvn clean compile; fi
|
||||||
when:
|
when:
|
||||||
@ -18,6 +19,7 @@ steps:
|
|||||||
# 自动检测是否存在 Python (requirements.txt)
|
# 自动检测是否存在 Python (requirements.txt)
|
||||||
- name: python-test
|
- name: python-test
|
||||||
image: python:3.12.0-slim
|
image: python:3.12.0-slim
|
||||||
|
pull: false
|
||||||
commands:
|
commands:
|
||||||
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
- if [ -f test_example.py ]; then python -m pytest test_example.py -v; fi
|
- if [ -f test_example.py ]; then python -m pytest test_example.py -v; fi
|
||||||
@ -27,6 +29,7 @@ steps:
|
|||||||
# 最终报告(无论成功失败都运行)
|
# 最终报告(无论成功失败都运行)
|
||||||
- name: summary
|
- name: summary
|
||||||
image: alpine
|
image: alpine
|
||||||
|
pull: false
|
||||||
commands:
|
commands:
|
||||||
- echo "✅ CI completed at $(date)"
|
- echo "✅ CI completed at $(date)"
|
||||||
when:
|
when:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user