-
-
Notifications
You must be signed in to change notification settings - Fork 377
101 lines (90 loc) · 3.45 KB
/
zulip-ci.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
# This file is largely copied from the Zulip server's continuous
# integration. The intent is to run the Zulip server's API
# documentation test suite using the current version of this project,
# to verify that the API client is generally compatible with the old
# server release.
name: Zulip server CI
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
# Bullseye ships with Python 3.9.2.
- docker_image: zulip/ci:bullseye
name: Debian 11 (Python 3.9, backend)
os: bullseye
legacy_client_interface: "4"
server_version: refs/tags/4.0
# Ubuntu 22.04 ships with Python 3.10.6.
- docker_image: zulip/ci:jammy
name: Ubuntu 22.04 (Python 3.10, backend)
os: jammy
legacy_client_interface: "6"
server_version: refs/tags/6.0
# Debian 12 ships with Python 3.11.2.
- docker_image: zulip/ci:bookworm
name: Debian 12 (Python 3.11, backend + documentation)
os: bookworm
legacy_client_interface: "7"
server_version: refs/tags/7.0
# Ubuntu 24.04 ships with Python 3.12.3.
- docker_image: zulip/ci:noble
name: Ubuntu 24.04 (Python 3.12, backend)
os: noble
legacy_client_interface: "8"
server_version: refs/tags/8.5
runs-on: ubuntu-latest
name: ${{ matrix.name }} (Zulip ${{matrix.server_version}})
container: ${{ matrix.docker_image }}
env:
# GitHub Actions sets HOME to /github/home which causes
# problem later in provison and frontend test that runs
# tools/setup/postgresql-init-dev-db because of the .pgpass
# location. PostgreSQL (psql) expects .pgpass to be at
# /home/github/.pgpass and setting home to `/home/github/`
# ensures it written there because we write it to ~/.pgpass.
HOME: /home/github/
steps:
- name: "Check out python-zulip-api"
uses: actions/checkout@v4
with:
path: api
- name: "Check out Zulip server ${{ matrix.server_version }}"
uses: actions/checkout@v4
with:
repository: zulip/zulip
ref: ${{ matrix.server_version }}
path: server
- name: Install dependencies
run: |
cd server
# This is the main setup job for the test suite
./tools/ci/setup-backend --skip-dev-db-build
# Cleaning caches is mostly unnecessary in GitHub Actions, because
# most builds don't get to write to the cache.
# scripts/lib/clean_unused_caches.py --verbose --threshold 0
- name: Replace dependency with the latest python-zulip-api
run: |
cd server
source tools/ci/activate-venv
pip install ../api/zulip
pip install ../api/zulip_bots
- name: Run documentation and api tests
run: |
cd server
source tools/ci/activate-venv
./tools/test-api
env:
LEGACY_CLIENT_INTERFACE_FROM_SERVER_DOCS_VERSION: ${{ matrix.legacy_client_interface }}
- name: Run backend tests
run: |
cd server
source tools/ci/activate-venv
./tools/test-backend zerver.tests.test_bots zerver.tests.test_embedded_bot_system
env:
LEGACY_CLIENT_INTERFACE_FROM_SERVER_DOCS_VERSION: ${{ matrix.legacy_client_interface }}