Skip to content

release 3.1.0 (#163) #339

release 3.1.0 (#163)

release 3.1.0 (#163) #339

name: Build and test - with worker_events
concurrency:
# for PR's cancel the running task, if another commit is pushed
group: ${{ github.workflow }} ${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- main
- master
jobs:
build:
name: CI using lua-resty-worker-events
runs-on: ubuntu-20.04
strategy:
matrix:
openresty-version: [1.21.4.3]
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_TIMEOUT=4 TEST_NGINX_RANDOMIZE=1 prove -I. -r t/with_worker-events