Skip to content

feat: replace cookie with resty session #65

feat: replace cookie with resty session

feat: replace cookie with resty session #65

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: "ubuntu-latest"
env:
OPENRESTY_PREFIX: "/usr/local/openresty"
steps:
- uses: actions/checkout@v2
- name: get dependencies
run: |
sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libxml2-dev libxslt-dev perl
# openresty
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-openssl111-dev
# Test::Nginx
sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
# luarocks
curl -fsSL https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh | bash
- name: script
run: |
sudo docker run --rm --name keycloak -d -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.2 start-dev
# wait for keycloak ready
bash -c 'while true; do curl -s localhost:8080 &>/dev/null; ret=$?; [[ $ret -eq 0 ]] && break; sleep 3; done'
# configure keycloak for test
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq
chmod +x jq
docker cp jq keycloak:/usr/bin/
docker cp t/kcadm_configure.sh keycloak:/tmp/
docker exec keycloak bash /tmp/kcadm_configure.sh
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$OPENRESTY_PREFIX/luajit/bin:$PATH
make test