Skip to content

Commit 56d2ec1

Browse files
bjoernricksgreenbonebot
authored andcommitted
Misc: Replace poetry with uv
Use uv instead of poetry because it has become the de-facto standard and it's way faster.
1 parent ae0333d commit 56d2ec1

13 files changed

Lines changed: 2013 additions & 2391 deletions

.github/dependabot.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,3 @@ updates:
2121
interval: "weekly"
2222
commit-message:
2323
prefix: "Deps"
24-
groups:
25-
github-actions:
26-
patterns:
27-
- "*"

.github/workflows/auto-merge.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Auto-merge squash
2+
23
on: pull_request_target
3-
4+
45
permissions:
56
contents: write
67
pull-requests: write
7-
8+
89
jobs:
910
auto-merge:
1011
uses: greenbone/workflows/.github/workflows/auto-merge.yml@main

.github/workflows/changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
jobs:
77
changelog:
88
name: Show changelog since last release
9-
runs-on: 'ubuntu-latest'
9+
runs-on: "ubuntu-latest"
1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v6
12+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1313
with:
1414
fetch-depth: 0 # for conventional commits and getting all git tags
1515
persist-credentials: false

.github/workflows/ci.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
linting:
1111
name: Linting
12+
runs-on: "ubuntu-latest"
1213
strategy:
1314
matrix:
1415
python-version:
@@ -17,14 +18,19 @@ jobs:
1718
- "3.11"
1819
- "3.12"
1920
- "3.13"
20-
uses: greenbone/workflows/.github/workflows/lint-python.yml@main
21-
with:
22-
lint-packages: gvm tests
23-
python-version: ${{ matrix.python-version }}
24-
linter: ruff check
21+
steps:
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
- name: Check and lint python packages
24+
uses: greenbone/actions/lint-python@v3
25+
with:
26+
package-manager: uv
27+
packages: gvm tests
28+
python-version: ${{ matrix.python-version }}
29+
linter: ruff check
2530

2631
test:
2732
name: Run tests
33+
runs-on: "ubuntu-latest"
2834
strategy:
2935
matrix:
3036
python-version:
@@ -33,9 +39,15 @@ jobs:
3339
- "3.11"
3440
- "3.12"
3541
- "3.13"
36-
uses: greenbone/workflows/.github/workflows/test-python.yml@main
37-
with:
38-
python-version: ${{ matrix.python-version }}
42+
steps:
43+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44+
- name: Set up Python ${{ matrix.python-version }}
45+
uses: greenbone/actions/uv@v3
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- name: Run unit test
49+
run: |
50+
uv run python -m unittest -v
3951
4052
mypy:
4153
name: Check type hints
@@ -49,36 +61,34 @@ jobs:
4961
- "3.12"
5062
- "3.13"
5163
steps:
52-
- uses: actions/checkout@v6
53-
- name: Run mypy
54-
uses: greenbone/actions/mypy-python@v3
64+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
65+
- name: Set up Python ${{ matrix.python-version }}
66+
uses: greenbone/actions/uv@v3
5567
with:
5668
python-version: ${{ matrix.python-version }}
69+
- name: Run mypy
70+
run: |
71+
uv run mypy
5772
5873
codecov:
5974
name: Upload coverage to codecov.io
6075
needs: test
6176
runs-on: "ubuntu-latest"
6277
steps:
63-
- uses: actions/checkout@v6
78+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6479
- name: Calculate and upload coverage to codecov.io
6580
uses: greenbone/actions/coverage-python@v3
6681
with:
67-
python-version: "3.10"
82+
package-manager: uv
6883
token: ${{ secrets.CODECOV_TOKEN }}
6984

7085
build-docs:
7186
name: Build the documentation
7287
runs-on: "ubuntu-latest"
7388
steps:
74-
- uses: actions/checkout@v6
75-
- name: Install poetry and dependencies
76-
uses: greenbone/actions/poetry@v3
89+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
90+
- name: Set up Python ${{ matrix.python-version }}
91+
uses: greenbone/actions/uv@v3
7792
- name: Build docs
7893
run: |
79-
cd docs
80-
poetry run make html
81-
82-
versioning:
83-
name: Check versioning
84-
uses: greenbone/workflows/.github/workflows/check-version.yml@main
94+
cd docs && uv run make html

.github/workflows/codeql.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [main]
8+
branches:
9+
- main
810
paths-ignore:
911
- "**/*.md"
1012
- "**/*.txt"
@@ -27,7 +29,7 @@ jobs:
2729

2830
steps:
2931
- name: Checkout repository
30-
uses: actions/checkout@v6
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3133

3234
- name: Initialize CodeQL
3335
uses: github/codeql-action/init@v4
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Dependency Review'
2-
on: [pull_request]
1+
name: "Dependency Review"
2+
on: pull_request
33

44
permissions:
55
contents: read
@@ -9,5 +9,5 @@ jobs:
99
dependency-review:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: 'Dependency Review'
12+
- name: "Dependency Review"
1313
uses: greenbone/actions/dependency-review@v3

.github/workflows/deploy-pypi.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Deploy on PyPI
22

33
on:
44
release:
5-
types: [created]
5+
types:
6+
- created
67

78
jobs:
89
deploy:

.github/workflows/github-pages.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,22 @@ concurrency:
2121

2222
jobs:
2323
deploy:
24-
uses: greenbone/workflows/.github/workflows/docs-python.yml@main
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
- name: Set up Python
32+
uses: greenbone/actions/uv@v3
33+
- name: Build Documentation
34+
run: |
35+
cd docs && uv run make html
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
38+
with:
39+
path: docs/build/html
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Release python-gvm
22

33
on:
44
pull_request:
5-
types: [closed]
5+
types:
6+
- closed
67
workflow_dispatch:
78
inputs:
89
release-type:
@@ -40,7 +41,7 @@ jobs:
4041
with:
4142
release-type-input: ${{ inputs.release-type }}
4243
- name: Checkout code
43-
uses: actions/checkout@v6
44+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4445
with:
4546
fetch-depth: 0 # for conventional commits and getting all git tags
4647
persist-credentials: false

.github/workflows/sbom-upload.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
name: SBOM upload
2+
23
on:
34
workflow_dispatch:
45
push:
5-
branches: ["main"]
6+
branches:
7+
- main
8+
69
jobs:
710
SBOM-upload:
811
runs-on: ubuntu-latest
912
permissions:
1013
id-token: write
1114
contents: write
1215
steps:
13-
- name: 'SBOM upload'
16+
- name: "SBOM upload"
1417
uses: greenbone/actions/sbom-upload@v3

0 commit comments

Comments
 (0)