-
Notifications
You must be signed in to change notification settings - Fork 2
129 lines (105 loc) · 3.3 KB
/
pontoon-tarball.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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@v4
- 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