Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d2c41d07d3 |
@@ -4,24 +4,40 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: ls -la "$GITEA_WORKSPACE" && pip install ruff==6.* && (cd "$GITEA_WORKSPACE" && ruff check .)
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
cache: pip
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
- run: ruff check .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
needs: lint
|
needs: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: pip install -r "$GITEA_WORKSPACE/requirements.txt" pytest pytest-cov
|
- uses: actions/checkout@v4
|
||||||
- run: cd "$GITEA_WORKSPACE" && pytest -q --cov=app --cov-branch --cov-fail-under=60
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
cache: pip
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
- run: pytest -q --cov=app --cov-branch --cov-fail-under=60
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: pip install radon xenon
|
- uses: actions/checkout@v4
|
||||||
- run: cd "$GITEA_WORKSPACE" && radon cc app -s -a && xenon --max-absolute C app/
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
cache: pip
|
||||||
|
- run: pip install -r requirements.txt
|
||||||
|
- run: radon cc app -s -a
|
||||||
|
- run: xenon --max-absolute C app/
|
||||||
|
|||||||
Reference in New Issue
Block a user