更新 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
|
||||
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 }}."
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.14"
|
||||
dependencies = []
|
||||
dependencies = ["pytest"]
|
||||
|
||||
Reference in New Issue
Block a user