Bump astral-sh/setup-uv from 4 to 5 #787
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Test Pontoon for Debian" | |
on: | |
push: | |
paths: | |
- "make-pontoon-tarball.sh" | |
- "debian/*" | |
- ".github/workflows/pontoon-tarball.yml" | |
pull_request: | |
paths: | |
- "make-pontoon-tarball.sh" | |
- "debian/**" | |
- ".github/workflows/pontoon-tarball.yml" | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
name: "Build Pontoon Tarball" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Set up Python 3.11 | |
run: uv python install 3.11 | |
- name: "Set up Node 20" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "Make Pontoon release tarball" | |
run: | | |
./make-pontoon-tarball.sh | |
- name: "Upload artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pontoon-release-tarball | |
path: ./dist/ | |
retention-days: 14 | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Debian 12 (bookworm)" # -> 2028-06 | |
os: ubuntu-22.04 | |
python-version: "3.11" | |
postgres-version: 15 | |
- name: "Ubuntu 22.04 (jammy)" # -> 2027-04 | |
os: ubuntu-22.04 | |
python-version: "3.10" | |
postgres-version: 14 | |
- name: "Ubuntu 24.04 (noble)" # -> 2029-04 | |
os: ubuntu-24.04 | |
python-version: "3.12" | |
postgres-version: 16 | |
name: "${{ matrix.name }} [py${{ matrix.python-version }}, pg${{ matrix.postgres-version }}]" | |
needs: build | |
runs-on: ${{ matrix.os }} | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_USER: pontoonuser | |
POSTGRES_PASSWORD: pontoonpassword | |
POSTGRES_DB: pontoondb | |
ports: | |
- 5432:5432 | |
steps: | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: "Download Pontoon release tarball" | |
uses: actions/download-artifact@v4 | |
with: | |
name: pontoon-release-tarball | |
- name: "Extract Pontoon release tarball" | |
run: | | |
tar -xvzf pontoon_*.tar.gz | |
- name: "Write basic configuration for Pontoon" | |
run: | | |
cd pontoon-* | |
echo "SECRET_KEY=pontoonsecret" >> .env | |
echo "DATABASE_URL=postgres://pontoonuser:pontoonpassword@localhost/pontoondb" >> .env | |
echo "DJANGO_DEBUG=True" >> .env | |
- name: "Install Python dependencies (Python 3.10)" | |
if: ${{ matrix.python-version == '3.10' }} | |
run: | | |
cd pontoon-* | |
pip install -r requirements.py310.txt | |
- name: "Install Python dependencies (Python 3.11)" | |
if: ${{ matrix.python-version == '3.11' }} | |
run: | | |
cd pontoon-* | |
pip install -r requirements.txt | |
- name: "Install Python dependencies (Python 3.12)" | |
if: ${{ matrix.python-version == '3.12' }} | |
run: | | |
cd pontoon-* | |
pip install -r requirements.txt | |
pip install setuptools | |
- name: "Make DB Migration" | |
run: | | |
cd pontoon-* | |
python manage.py migrate |