feat: release v1.10.4 (#206) #267
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- version: 3.4.0 | |
conf: Procfile-single | |
- version: 3.5.0 | |
conf: Procfile-single | |
- version: 3.4.0 | |
conf: Procfile-single-enable-tls | |
- version: 3.4.0 | |
conf: Procfile-single-enable-mtls | |
runs-on: "ubuntu-20.04" | |
env: | |
OPENRESTY_PREFIX: "/usr/local/openresty" | |
AUTH_ENDPOINT_V3: "127.0.0.1:12379" | |
AUTH_USER: root | |
AUTH_PWD: abc123 | |
ETCD_VER: "${{ matrix.version }}" | |
GOREMAN_CONF: "${{ matrix.conf }}" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup go | |
uses: actions/[email protected] | |
with: | |
# goreman requires 1.17 | |
go-version: "1.17" | |
- name: get dependencies | |
run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl | |
- name: Setup Lua | |
uses: leafo/[email protected] | |
with: | |
luaVersion: "5.1.5" | |
- name: Install Luarocks | |
uses: leafo/gh-actions-luarocks@v4 | |
- name: install | |
run: | | |
git clone https://github.com/openresty/test-nginx.git test-nginx | |
cd test-nginx && (sudo cpanm --notest . > build.log 2>&1 || (cat build.log && exit 1)) && cd .. | |
wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh | |
chmod +x build-apisix-base.sh | |
OR_PREFIX=$OPENRESTY_PREFIX ./build-apisix-base.sh latest | |
luarocks make rockspec/lua-resty-etcd-master-0.1-0.rockspec | |
luarocks install luacheck > build.log 2>&1 || (cat build.log && exit 1) | |
luarocks install dkjson > build.log 2>&1 || (cat build.log && exit 1) | |
make utils | |
wget https://github.com/etcd-io/etcd/releases/download/v$ETCD_VER/etcd-v$ETCD_VER-linux-amd64.tar.gz | |
tar xf etcd-v$ETCD_VER-linux-amd64.tar.gz | |
# run etcd local cluster, startup at localhost:2379, localhost:22379, and localhost:32379 | |
# see more https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/local_cluster.md | |
go get github.com/mattn/goreman | |
- name: script | |
if: matrix.conf != 'Procfile-single-enable-mtls' | |
run: | | |
if [[ "$GOREMAN_CONF" == "Procfile-single-enable-tls" ]]; then | |
export ETCD_ENABLE_TLS=TRUE | |
export ETCDCTL_EXTRA_OPTS="--insecure-transport=false --insecure-skip-tls-verify=true" | |
fi | |
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$PWD/etcd-v$ETCD_VER-linux-amd64:$PATH | |
etcd --version | |
goreman -f ./t/$GOREMAN_CONF start > goreman.log 2>&1 & | |
sleep 5 | |
chmod +x ./t/v3/add-auth.sh | |
[[ $ETCD_ENABLE_TLS != TRUE ]] && ./t/v3/add-auth.sh || true | |
cat goreman.log | |
ps -ef | grep etcd | |
luajit -v | |
luajit -v | awk '{print$2}'| grep 2.1 | |
make lint || exit 1 | |
make test | |
- name: script | |
if: matrix.conf == 'Procfile-single-enable-mtls' | |
run: | | |
export ETCD_ENABLE_MTLS=TRUE | |
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$PWD/etcd-v$ETCD_VER-linux-amd64:$PATH | |
etcd --version | |
goreman -f ./t/$GOREMAN_CONF start > goreman.log 2>&1 & | |
sleep 5 | |
prove -I../test-nginx/lib t/v3/mtls.t t/v3/grpc/mtls.t |