Support regex_uri in redirect plugin. #1
Workflow file for this run
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: Release Test | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- '.git/**' | |
- '.gitattributes' | |
- '.vscode/**' | |
- '.gitignore' | |
- 'docs/**' | |
- 'api/internal/core/store/validate_mock.go' | |
- 'api/internal/core/storage/storage_mock.go' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- '.git/**' | |
- '.gitattributes' | |
- '.vscode/**' | |
- '.gitignore' | |
- 'docs/**' | |
- 'api/internal/core/store/validate_mock.go' | |
- 'api/internal/core/storage/storage_mock.go' | |
jobs: | |
run-test: | |
runs-on: ubuntu-latest | |
services: | |
etcd: | |
image: bitnami/etcd:3.5.2 | |
ports: | |
- 2379:2379 | |
- 2380:2380 | |
env: | |
ALLOW_NONE_AUTHENTICATION: yes | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: release and build | |
run: | | |
VERSION=$(cat ./api/VERSION) | |
mkdir release | |
git clean -Xdf | |
tar -zcvf release/apache-apisix-dashboard-${VERSION}-src.tgz \ | |
--exclude .github \ | |
--exclude .git \ | |
--exclude .gitattributes \ | |
--exclude .idea \ | |
--exclude .vscode \ | |
--exclude .gitignore \ | |
--exclude .DS_Store \ | |
--exclude docs \ | |
--exclude release \ | |
--exclude api/internal/core/store/validate_mock.go \ | |
--exclude api/internal/core/storage/storage_mock.go \ | |
. | |
cd release | |
tar -zxvf apache-apisix-dashboard-${VERSION}-src.tgz | |
ls -l | |
export GO111MOUDULE=on | |
api/build.sh | |
mkdir -p ./output/logs | |
cd output | |
./manager-api > ./api.log 2>&1 & | |
sleep 3 | |
cat ./api.log | |
cat ./logs/error.log | |
cat conf/conf.yaml | |
- name: run test | |
run: | | |
curl http://127.0.0.1:9000/apisix/admin/user/login -X POST -i -d '{"username":"admin", "password": "admin"}' | |
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000/apisix/admin/user/login -X POST -i -d '{"username":"admin", "password": "admin"}') | |
if [ ! $code -eq 200 ]; then | |
echo "failed: failed to custom port" | |
exit 1 | |
fi |