-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove the dependency on git from the build script #1024
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9ce3deb
fix: remove the dependency on git from the build script
johzchen 3a19e8e
ci: add test for release
johzchen 17bdb14
ci: add test for release
johzchen 3371f48
test
johzchen f23502d
fix error
johzchen 768d56d
fix error
johzchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Release Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
etcd: | ||
image: bitnami/etcd:3.4.13 | ||
ports: | ||
- 2379:2379 | ||
- 2380:2380 | ||
env: | ||
ALLOW_NONE_AUTHENTICATION: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.13' | ||
|
||
- 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 & | ||
|
||
- 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 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate file like
Makefile
, could we use only one of them?