Skip to content

Commit 9b4f9ea

Browse files
authored
ref: migrate to uv (#4061)
* ref: migrate to uv * chore: remove main.py * fix: run pytest using uv * fix: pin Python and uv version * fix: extra spaces * ref: remove setup-python
1 parent ebace8c commit 9b4f9ea

File tree

11 files changed

+678
-26
lines changed

11 files changed

+678
-26
lines changed

.github/workflows/fast-revert.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
if: |
2020
github.event_name == 'workflow_dispatch' || github.event.label.name == 'Trigger: Revert'
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2323
with:
2424
token: ${{ secrets.BUMP_SENTRY_TOKEN }}
25-
- uses: getsentry/[email protected]
25+
- uses: getsentry/action-fast-revert@35b4b6c1f8f91b5911159568b3b15e531b5b8174 # v2.0.1
2626
with:
2727
pr: ${{ github.event.number || github.event.inputs.pr }}
2828
co_authored_by: ${{ github.event.inputs.co_authored_by || format('{0} <{1}+{0}@users.noreply.github.com>', github.event.sender.login, github.event.sender.id) }}

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
pre-commit:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v6
16-
- uses: actions/setup-python@v6
15+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
16+
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
1717
with:
1818
python-version: 3.x
19-
- uses: pre-commit/[email protected]
19+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
with:
2828
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2929
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
30-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3131
with:
3232
token: ${{ steps.token.outputs.token }}
3333
fetch-depth: 0
3434
- name: Prepare release
3535
id: prepare-release
36-
uses: getsentry/action-prepare-release@v1
36+
uses: getsentry/action-prepare-release@3cea80dc3938c0baf5ec4ce752ecb311f8780cdc # v1.6.4
3737
env:
3838
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3939
with:
@@ -48,10 +48,10 @@ jobs:
4848
name: Create release on self-hosted dogfood instance
4949
needs: release
5050
steps:
51-
- uses: actions/checkout@v6
51+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
5252
with:
5353
fetch-depth: 0
54-
- uses: getsentry/action-release@v3
54+
- uses: getsentry/action-release@128c5058bbbe93c8e02147fe0a9c713f166259a6 # v3.4.0
5555
env:
5656
SENTRY_ORG: self-hosted
5757
SENTRY_PROJECT: installer

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Repository checkout
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2222
with:
2323
fetch-depth: 0
2424

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
name: ${{ matrix.os == 'ubuntu-24.04-arm' && 'unit tests (arm64)' || 'unit tests' }}
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v6
35+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3636

3737
- name: Get Compose
3838
uses: ./get-compose-action
@@ -56,7 +56,7 @@ jobs:
5656
CONTAINER_ENGINE_PODMAN: ${{ matrix.container_engine == 'podman' && '1' || '0' }}
5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@v6
59+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
6060

6161
- name: Install Podman
6262
if: matrix.container_engine == 'podman'

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ target/
6969
# Ipython Notebook
7070
.ipynb_checkpoints
7171

72-
# pyenv
73-
.python-version
74-
7572
# https://docs.docker.com/compose/extends/
7673
docker-compose.override.yml
7774

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

action.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,24 @@ runs:
5151
sudo rm -rf /usr/share/dotnet /usr/share/doc/dotnet-*
5252
df -h
5353
54+
- name: Setup uv
55+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
56+
with:
57+
working-directory: ${{ github.action_path }}
58+
version: "0.9.15"
59+
# we just cache the venv-dir directly in action-setup-venv
60+
enable-cache: false
61+
62+
- uses: getsentry/action-setup-venv@0958463ee0e02b9e8aa8f8e031afae1f84b80881 # v3.0.0
63+
with:
64+
cache-dependency-path: uv.lock
65+
install-cmd: uv sync --frozen --active
66+
5467
- name: Setup dev environment
5568
shell: bash
5669
run: |
5770
cd ${{ github.action_path }}
58-
pip install -r requirements-dev.txt
71+
5972
echo "PY_COLORS=1" >> "$GITHUB_ENV"
6073
### pytest-sentry configuration ###
6174
if [ "$GITHUB_REPOSITORY" = "getsentry/self-hosted" ]; then
@@ -191,7 +204,7 @@ runs:
191204
- name: Upload coverage to Codecov
192205
if: inputs.CODECOV_TOKEN
193206
continue-on-error: true
194-
uses: codecov/codecov-action@v5
207+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
195208
with:
196209
directory: ${{ github.action_path }}
197210
token: ${{ inputs.CODECOV_TOKEN }}
@@ -200,7 +213,7 @@ runs:
200213
- name: Upload test results to Codecov
201214
if: inputs.CODECOV_TOKEN && !cancelled()
202215
continue-on-error: true
203-
uses: codecov/test-results-action@v1
216+
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
204217
with:
205218
directory: ${{ github.action_path }}
206219
token: ${{ inputs.CODECOV_TOKEN }}

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "sentry-self-hosted"
3+
version = "0.1.0"
4+
description = "Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept."
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
dependencies = []
8+
9+
[dependency-groups]
10+
dev = [
11+
"beautifulsoup4>=4.7.1",
12+
"cryptography>=43.0.3",
13+
"httpx>=0.25.2",
14+
"pytest>=8.0.0",
15+
"pytest-cov>=4.1.0",
16+
"pytest-rerunfailures>=11.0",
17+
"pytest-sentry>=0.1.11",
18+
"sentry-sdk>=2.4.0,<3.0.0",
19+
]

requirements-dev.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)