From 4831a5a97ab424e7d8083a74646f19fa8c36583b Mon Sep 17 00:00:00 2001 From: Mplan Date: Mon, 8 Jun 2026 22:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Gitea=20Actions=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=AD=A5=E9=AA=A4=E4=B8=BA=E4=BD=BF=E7=94=A8=20uv=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=EF=BC=8C=E5=B9=B6=E6=9B=B4=E6=96=B0=20README?= =?UTF-8?q?=20=E5=92=8C=20pyproject.toml=20=E6=96=87=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E5=8F=8D=E6=98=A0=E4=BE=9D=E8=B5=96=E5=85=B3=E7=B3=BB=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/python-action-test.yml | 32 +++++++++++++------------ README.md | 5 ++-- pyproject.toml | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/python-action-test.yml b/.gitea/workflows/python-action-test.yml index 0f33648..eb2a576 100644 --- a/.gitea/workflows/python-action-test.yml +++ b/.gitea/workflows/python-action-test.yml @@ -1,27 +1,29 @@ -name: Python Action Test -run-name: ${{ gitea.actor }} -on: - push: - branches: [main] - pull_request: - branches: [main] +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] jobs: - test: + Explore-Gitea-Actions: runs-on: ubuntu-22.04 steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - name: Set up Python uses: actions/setup-python@v5 with: python-version: 3.14 - - - name: Install test dependencies + - name: Install uv run: | python -m pip install --upgrade pip - python -m pip install pytest - - - name: Run unit tests - run: pytest + python -m pip install uv + - name: Install dependencies with uv + run: uv install + - name: Run tests + run: uv run pytest + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/README.md b/README.md index b7f915f..f3d895a 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ ```bash python main.py -python -m pip install pytest -pytest +python -m pip install uv +uv install +uv run pytest ``` ## Gitea Actions diff --git a/pyproject.toml b/pyproject.toml index 0d6c0cf..4946c29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,4 @@ version = "0.1.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.14" -dependencies = [] +dependencies = ["pytest"]