ci: Update jobs' server versions to 8.x/9.x/10.x. #65
This file contains hidden or 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
# 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, workflow_dispatch] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# 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: "10" | |
server_version: refs/tags/10.1 | |
# 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: "10" | |
server_version: refs/tags/10.4 | |
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 -vvv requests | |
pip install -vvv distro | |
pip install -vvv click | |
pip install -vvv typing_extensions | |
pip install -vvv html2text | |
pip install -vvv beautifulsoup4 | |
pip install -vvv lxml | |
pip install -vvv zulip | |
pip install -vvv 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 }} |