CI: Upgrade runner to Ubuntu 24.04 #10
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: CI | |
on: [ push, pull_request, workflow_dispatch ] | |
jobs: | |
CI: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
nginx-version: 1.27.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
# for Test::Nginx | |
curl -fsSL https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg | |
echo "deb [signed-by=/usr/share/keyrings/openresty.gpg] https://openresty.org/package/ubuntu $(lsb_release -sc) main" | \ | |
sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null | |
sudo apt-get update | |
sudo apt-get install libtest-nginx-perl redis-server | |
- name: Install nginx | |
env: | |
NGINX_VERSION: ${{ matrix.nginx-version }} | |
run: ci/install-nginx.sh --add-module=$GITHUB_WORKSPACE/ | |
- name: Build Redis rate limiter module | |
run: ci/build-rate-limiter.sh | |
- name: Install Redis rate limiter module | |
run: | | |
sudo mkdir -p /usr/lib/redis/modules | |
sudo mv rate-limiter/ratelimit.so /usr/lib/redis/modules/ | |
- name: Load Redis rate limiter module | |
run: | | |
# Redis < 7 | |
# redis-cli MODULE LOAD /usr/lib/redis/modules/ratelimit.so | |
# Redis >= 7 (due to `enable-module-command no` restriction) | |
echo "loadmodule /usr/lib/redis/modules/ratelimit.so" | sudo tee -a /etc/redis/redis.conf | |
sudo service redis-server restart | |
- name: Prepare environment | |
run: echo "$HOME/nginx/sbin" >> $GITHUB_PATH | |
- name: Run integration tests | |
run: prove -r t |