更新 Gitea Actions 工作流,修改测试步骤为使用 uv 工具,并更新 README 和 pyproject.toml 文件以反映依赖关系的变化
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 18s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 18s
This commit is contained in:
@@ -1,27 +1,29 @@
|
|||||||
name: Python Action Test
|
name: Gitea Actions Demo
|
||||||
run-name: ${{ gitea.actor }}
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
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
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.14
|
python-version: 3.14
|
||||||
|
- name: Install uv
|
||||||
- name: Install test dependencies
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install pytest
|
python -m pip install uv
|
||||||
|
- name: Install dependencies with uv
|
||||||
- name: Run unit tests
|
run: uv install
|
||||||
run: pytest
|
- 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 }}."
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
python main.py
|
python main.py
|
||||||
python -m pip install pytest
|
python -m pip install uv
|
||||||
pytest
|
uv install
|
||||||
|
uv run pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Gitea Actions
|
## Gitea Actions
|
||||||
|
|||||||
+1
-1
@@ -4,4 +4,4 @@ version = "0.1.0"
|
|||||||
description = "Add your description here"
|
description = "Add your description here"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.14"
|
requires-python = ">=3.14"
|
||||||
dependencies = []
|
dependencies = ["pytest"]
|
||||||
|
|||||||
Reference in New Issue
Block a user