Skip to content

Commit 6b55a9b

Browse files
authored
Update deploy script to use uv (#536)
* Update deploy script to use uv * Don't run make with uv
1 parent bd47a25 commit 6b55a9b

File tree

7 files changed

+40
-24
lines changed

7 files changed

+40
-24
lines changed

.github/workflows/deploy.yml

+15-10
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out the repository
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Set up Python
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.11'
1919

@@ -22,16 +22,21 @@ jobs:
2222
sudo add-apt-repository universe multiverse
2323
sudo apt update && sudo apt install enchant-2 libffi-dev libssl-dev libxml2-dev libxslt1-dev gettext libfreetype-dev libjpeg-dev
2424
25-
- name: Install dependencies
26-
run: |
27-
pip install -r requirements.txt
28-
pip install "Jinja2<3.1" "sphinx==5.0.*"
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
enable-cache: true
29+
30+
- name: Install Python dependencies
31+
run: uv sync --only-group doc
2932
working-directory: doc
30-
33+
3134
- name: Build documentation
32-
run: make html
35+
run: |
36+
source .venv/bin/activate
37+
make html
3338
working-directory: doc # Adjust to your Sphinx docs directory
34-
39+
3540
- name: Copy CNAME if it exists
3641
run: |
3742
if [ -f CNAME ]; then cp CNAME doc/_build/html/; fi
@@ -40,4 +45,4 @@ jobs:
4045
uses: peaceiris/actions-gh-pages@v3
4146
with:
4247
github_token: ${{ secrets.GITHUB_TOKEN }}
43-
publish_dir: doc/_build/html
48+
publish_dir: doc/_build/html

.github/workflows/docker-pr-deploy.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Docker-pr-deploy
22
on:
33
workflow_dispatch:
44
inputs:
5-
repository:
5+
repository:
66
description: "Repository name with owner. For example, actions/checkout"
7-
ref:
7+
ref:
88
description: "The branch, tag or SHA to checkout."
99

1010
jobs:
@@ -17,13 +17,13 @@ jobs:
1717
with:
1818
repository: ${{ inputs.repository }}
1919
ref: ${{ inputs.ref }}
20-
20+
2121
- name: Log in to Docker Hub
2222
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
2323
with:
2424
username: ${{ secrets.DOCKER_USERNAME }}
2525
password: ${{ secrets.DOCKER_PASSWORD }}
26-
26+
2727
- name: Build and push Docker image
2828
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
2929
with:

.github/workflows/docker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ jobs:
1212
steps:
1313
- name: Check out the repo
1414
uses: actions/checkout@v2
15-
15+
1616
- name: Log in to Docker Hub
1717
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
1818
with:
1919
username: ${{ secrets.DOCKER_USERNAME }}
2020
password: ${{ secrets.DOCKER_PASSWORD }}
21-
21+
2222
- name: Extract metadata (tags, labels) for Docker
2323
id: meta
2424
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
2525
with:
2626
images: eventyay/eventyay-ticket
27-
27+
2828
- name: Build and push Docker image
2929
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
3030
with:

.github/workflows/docs.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,31 @@ jobs:
1919
name: Spellcheck
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v2
22+
- name: Check out the repository
23+
uses: actions/checkout@v4
24+
2325
- name: Set up Python 3.11
24-
uses: actions/setup-python@v1
26+
uses: actions/setup-python@v5
2527
with:
2628
python-version: 3.11
29+
2730
- name: Install system packages
28-
run: sudo apt-get update && sudo apt-get install enchant-2 hunspell aspell-en
31+
run: sudo apt-get update && sudo apt-get install enchant-2 hunspell aspell-en gettext
32+
2933
- name: Install uv
3034
uses: astral-sh/setup-uv@v5
3135
with:
3236
enable-cache: true
37+
3338
- name: Install Dependencies
3439
run: uv sync --only-group doc
40+
3541
- name: Spellcheck docs
36-
run: uv run make spelling
42+
run: |
43+
source .venv/bin/activate
44+
make spelling
3745
working-directory: ./doc
46+
3847
- name: Check no errors
3948
run: '[ ! -s _build/spelling/output.txt ]'
4049
working-directory: ./doc

.github/workflows/tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
run: make npminstall
5555
- name: Compile
5656
working-directory: ./src
57-
run: uv run make all compress
57+
run: |
58+
source .venv/bin/activate
59+
make all compress
5860
- name: Run tests
5961
working-directory: ./src
6062
run: PRETIX_CONFIG_FILE=tests/travis_${{ matrix.database }}.cfg uv run pytest -n 3 -p no:sugar --cov=./ --cov-report=xml tests --maxfail=100

doc/development/setup.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Activate your virtual environment (`uv` creates virtual environment in _.venv_ d
5757
5858
`uv` automatically creates virtual environment in _.venv_ directory.
5959
If you want to create virtual environment outside the project directory, you can do so with
60-
a different tool and tell `uv` to repspect the activated virtual environment by setting the
60+
a different tool and tell `uv` to respect the activated virtual environment by setting the
6161
`UV_PROJECT_ENVIRONMENT` environment variable.
6262

6363
For Bash and Zsh:

src/tests/travis_postgres.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[database]
2-
backend=postgresql_psycopg2
2+
backend=postgresql
33
name=pretix
44
user=postgres
55
password=postgres

0 commit comments

Comments
 (0)