Supported nginx stable version 1.26.2 and mainline version 1.27.1 #73
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: test openresty | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
test-openresty: | |
strategy: | |
matrix: | |
version: [1.21.4.3, 1.25.3.1] | |
fail-fast: false | |
runs-on: "ubuntu-20.04" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get dependencies | |
run: | | |
sudo apt update | |
sudo apt remove nginx libgd3 | |
sudo apt install -y libgd-dev libgeoip-dev libxslt1-dev libperl-dev | |
sudo apt install -y libpcre3 libpcre3-dev | |
sudo apt-get install libnet-dns-perl | |
sudo cpan -T -i Test::More | |
- name: get openresty source | |
run: | | |
pwd | |
wget https://openresty.org/download/openresty-${{ matrix.version }}.tar.gz | |
tar xf openresty-${{ matrix.version }}.tar.gz | |
mv openresty-${{ matrix.version }} openresty | |
- name: build | |
run: | | |
pwd | |
cd openresty | |
./configure --prefix=/opt/openresty --with-ld-opt="-lpcre" --add-module=../ | |
patch -d build/nginx-*/ -p1 < ../patch/proxy_connect_rewrite_102101.patch | |
make -j | |
sudo make install | |
- name: check nginx binary | |
run: | | |
ls -l /opt/openresty/nginx/sbin/nginx | |
ldd /opt/openresty/nginx/sbin/nginx |grep -i lua | |
echo "Is there nginx worker?"; ps aux|grep nginx | |
#echo "LD PATH: $LD_LIBRARY_PATH" | |
#export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
/opt/openresty/nginx/sbin/nginx -V | |
- name: get nginx-tests | |
run: git clone https://github.com/nginx/nginx-tests | |
- name: test | |
run: | | |
pwd | |
#sed -i -e "s+#LUA_PACKAGE_PATH+lua_package_path \"/opt/openresty/lualib//?.lua;;\";+" ./t/*.t | |
#grep -i lua_package_path ./t/*.t | |
export TEST_NGINX_GLOBALS_HTTP='lua_package_path "/opt/openresty/lualib/?.lua;;";' | |
nginx_tests_lib_path=./nginx-tests/lib | |
proxy_connect_test_cases=./t/ | |
#export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
TEST_NGINX_UNSAFE=yes TEST_NGINX_BINARY=/opt/openresty/nginx/sbin/nginx prove -v -I $nginx_tests_lib_path $proxy_connect_test_cases | |