Skip to content

feat: sync from upstream release/1.6.x #2

feat: sync from upstream release/1.6.x

feat: sync from upstream release/1.6.x #2

name: Build and test
on: [push, pull_request]
jobs:
build:
name: CI using lua-resty-worker-events
runs-on: ubuntu-20.04
strategy:
matrix:
openresty-version: [1.21.4.1]
steps:
- name: Update and install OS dependencies
run: |
sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert
sudo systemctl disable nginx
sudo systemctl stop nginx
- name: Set environment variables
env:
OPENRESTY_VER: ${{ matrix.openresty-version }}
run: |
echo "/usr/local/openresty/nginx/sbin" >> $GITHUB_PATH
- name: Checkout lua-resty-healthcheck
uses: actions/checkout@v3
- name: Install OpenResty ${{ matrix.openresty-version }}
env:
OPENRESTY_VER: ${{ matrix.openresty-version }}
run: |
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list
sudo apt-get update
sudo apt-get -y install openresty=$OPENRESTY_VER-1~focal1
- name: Install LuaRocks
run: sudo apt-get install -y luarocks
- name: Install manual dependencies
run: |
sudo luarocks install luacheck
sudo luarocks install lua-resty-worker-events 1.0.0
- name: Install Test::NGINX
run: |
sudo apt-get install cpanminus
cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
cpanm --notest Test::Nginx
- name: Checkout lua-resty-healthcheck
uses: actions/checkout@v3
- name: Install lua-resty-healthcheck
run: sudo luarocks make
- name: Run tests
run: |
eval `luarocks path`
eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
TEST_NGINX_RANDOMIZE=1 prove -I. -r t/with_worker-events