File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,14 @@ jobs:
43
43
git clone https://github.com/LearningOS/rCore-Tutorial-Checker-2025S.git ci-user
44
44
git clone https://github.com/LearningOS/rCore-Tutorial-Test-2025S.git ci-user/user
45
45
46
- # --- 使用环境变量强制指定镜像源 ---
47
- export CARGO_SOURCE_CRATES_IO_REPLACE_WITH='tuna'
48
- export CARGO_REGISTRIES_TUNA_INDEX='https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git'
49
- # --- 结束 ---
46
+ ID=`git rev-parse --abbrev-ref HEAD | grep -oP 'ch\K[0-_]'`
47
+
48
+ # 直接将环境变量作为 make 命令的前缀,以保证最高优先级
49
+ cd ci-user && \
50
+ CARGO_SOURCE_CRATES_IO_REPLACE_WITH='tuna' \
51
+ CARGO_REGISTRIES_TUNA_INDEX='https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git' \
52
+ make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }} > ../output.txt
50
53
51
- ID=`git rev-parse --abbrev-ref HEAD | grep -oP 'ch\K[0-9]'`
52
- cd ci-user && make test CHAPTER=$ID passwd=${{ secrets.BASE_TEST_TOKEN }} > ../output.txt
53
54
cat ../output.txt
54
55
55
56
- name : end
You can’t perform that action at this time.
0 commit comments