update #8

Merged
zhangliang2021 merged 4 commits from main into dev2 2025-09-30 15:54:52 +08:00
1 changed files with 4 additions and 20 deletions

View File

@ -10,26 +10,10 @@ on:
jobs:
actions:
# runs-on: ''
steps:
- name: 'pull code'
run: |
git clone https://gitlink.org.cn/zhangliang2021/GPUCodeForces.git .
git log -n 3
git fetch origin pull/${{ github.event.pull_request.number }}/head:pull/${{ github.event.pull_request.number }}/head
git checkout pull/${{ github.event.pull_request.number }}/head
git log -n 3
git branch -a
- name: 'test'
sh: bash
run: |
script_path=`git diff --name-status origin/main | grep run_code.py | awk '{print $2}'`
if [ -n "${script_path}" ];then
python3 "${script_path}" 2>&1 | tee -a test.log
return_code=${PIPESTATUS[0]}
else
echo "该提交无赛题测试run_code.py测试脚本及其对应测试结果请判断是否遗漏提交或者非赛题提交谨慎合并本次提交" 2>&1 | tee -a test.log
return_code=${PIPESTATUS[0]}
fi
exit $return_code
curl -X POST https://cicd.metax-tech.com/job/ccf_GPUCodeForces_gitlink_smoke_test \
--user ccf_bot:1154beee0ae7063df13f10ca76f4869268 \
--data-urlencode json='{"parameter": [{"name":"pr_number", "value":"${{ github.event.pull_request.number }}"}]}'