fix(active-checks): use HTTP/1.1 for health check probes with automat… #370
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
| 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-22.04 | |
| strategy: | |
| matrix: | |
| openresty-version: [1.27.1.2] | |
| 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@v4 | |
| - 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 gpg --dearmor -o /usr/share/keyrings/openresty.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://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 -y install openresty=$OPENRESTY_VER-1~jammy1 | |
| - 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@v4 | |
| - 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 |