Skip to content

Commit 554406d

Browse files
committed
feat(lib): remove version check from resty.events
1 parent 830ae32 commit 554406d

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

.github/workflows/build_and_test_with_resty_events.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-20.04
2121
strategy:
2222
matrix:
23-
openresty-version: [1.19.9.1, 1.21.4.1, 1.21.4.3, 1.25.3.1]
23+
openresty-version: [1.19.9.1, 1.21.4.3, 1.25.3.1]
2424

2525
steps:
2626
- name: Update and install OS dependencies
@@ -60,11 +60,9 @@ jobs:
6060
key: ${{ runner.os }}-${{ hashFiles('**/.github/workflows/build_and_test_with_resty_events.yml') }}-${{ matrix.openresty-version }}
6161

6262
- name: Add to Path
63-
if: steps.cache-deps.outputs.cache-hit != 'true'
6463
run: echo "$INSTALL_ROOT/bin:$INSTALL_ROOT/nginx/sbin:$INSTALL_ROOT/luajit/bin:/usr/bin" >> $GITHUB_PATH
6564

6665
- name: Build and install OpenSSL
67-
if: steps.cache-deps.outputs.cache-hit != 'true'
6866
run: |
6967
curl -sSLO https://www.openssl.org/source/openssl-$OPENSSL.tar.gz
7068
tar -xzf openssl-$OPENSSL.tar.gz
@@ -75,14 +73,12 @@ jobs:
7573
7674
- name: Checkout lua-resty-events
7775
uses: actions/checkout@v3
78-
if: steps.cache-deps.outputs.cache-hit != 'true'
7976
with:
8077
repository: Kong/lua-resty-events
8178
ref: refs/tags/0.2.1
8279
path: lua-resty-events
8380

8481
- name: Build and install OpenResty
85-
if: steps.cache-deps.outputs.cache-hit != true
8682
run: |
8783
curl -sSLO https://openresty.org/download/openresty-$OPENRESTY.tar.gz
8884
tar -xzf openresty-$OPENRESTY.tar.gz
@@ -106,7 +102,6 @@ jobs:
106102
make install LUA_LIBDIR=$INSTALL_ROOT/lualib
107103
108104
- name: Install LuaRocks
109-
if: steps.cache-deps.outputs.cache-hit != 'true'
110105
run: |
111106
curl -sSLO https://luarocks.org/releases/luarocks-$LUAROCKS.tar.gz
112107
tar -xzf luarocks-$LUAROCKS.tar.gz
@@ -120,19 +115,16 @@ jobs:
120115
make install
121116
122117
- name: Install manual dependencies
123-
if: steps.cache-deps.outputs.cache-hit != 'true'
124118
run: |
125119
luarocks install luacheck
126120
127121
- name: Install Test::NGINX
128-
if: steps.cache-deps.outputs.cache-hit != 'true'
129122
run: |
130123
sudo apt-get install cpanminus
131124
cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
132125
cpanm --notest Test::Nginx
133126
134127
- name: Install lua-resty-events
135-
if: steps.cache-deps.outputs.cache-hit != 'true'
136128
run: |
137129
cd lua-resty-events
138130
OPENRESTY_PREFIX=$INSTALL_ROOT PREFIX=$INSTALL_ROOT LUA_LIB_DIR=$INSTALL_ROOT/lualib make install

.github/workflows/build_and_test_with_worker_events.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-20.04
2020
strategy:
2121
matrix:
22-
openresty-version: [1.21.4.1]
22+
openresty-version: [1.21.4.3]
2323

2424
steps:
2525
- name: Update and install OS dependencies

lib/resty/healthcheck.lua

-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ local type = type
4848
local assert = assert
4949

5050

51-
local RESTY_EVENTS_VER = [[^0\.[12]\.\d+$]]
5251
local RESTY_WORKER_EVENTS_VER = "0.3.3"
5352

5453

@@ -113,8 +112,6 @@ local function load_events_module(self)
113112

114113
elseif self.events_module == "resty.events" then
115114
worker_events = require("resty.events.compat")
116-
local version_match = ngx.re.match(worker_events._VERSION, RESTY_EVENTS_VER, "o")
117-
assert(version_match, "unsupported lua-resty-events version")
118115

119116
else
120117
error("unknown events module")

0 commit comments

Comments
 (0)