From 201002dff1b8a31b3da224b6e1c8213c47c27912 Mon Sep 17 00:00:00 2001 From: LufsX Date: Thu, 24 Oct 2024 14:22:30 +0800 Subject: [PATCH] feat: add test actions --- .gitea/workflows/test.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..6cb571f --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,27 @@ +name: Gitea Actions Experiment Test +run-name: 实验自动评测 Actions 🚀 +on: [push] + +jobs: + Experiment-Actions: + runs-on: ubuntu-latest + steps: + - name: 检出代码 + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: 安装依赖 + run: | + python -m venv ./.venv + . ./.venv/bin/activate + curl -s -o pip_cache.tar.gz ${{ vars.BACKEND_URL }}/download/pip_cache.tar.gz + tar -zxf pip_cache.tar.gz + pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple + rm -rf horse-colic.data horse-colic.test main.py + curl -s -o main.py ${{ vars.BACKEND_URL }}/public/experiment/logreg/main.py + curl -s -o horse-colic.data ${{ vars.BACKEND_URL }}/public/experiment/logreg/horse-colic.data + curl -s -o horse-colic.test ${{ vars.BACKEND_URL }}/public/experiment/logreg/horse-colic.test + - name: 评测结果 + run: | + . ./.venv/bin/activate + python main.py