-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from IGinX-THU/fix_ut
Fix unit tests
- Loading branch information
Showing
12 changed files
with
162 additions
and
215 deletions.
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,19 @@ | ||
name: 'etcd-runner' | ||
description: 'etcd runner' | ||
|
||
runs: | ||
using: "composite" # Mandatory parameter | ||
steps: | ||
- name: Start ETCD | ||
shell: bash | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
chmod +x "${GITHUB_WORKSPACE}/.github/etcd.sh" | ||
"${GITHUB_WORKSPACE}/.github/etcd.sh" | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
chmod +x "${GITHUB_WORKSPACE}/.github/etcd_macos.sh" | ||
"${GITHUB_WORKSPACE}/.github/etcd_macos.sh" | ||
else | ||
echo "$RUNNER_OS is not supported" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
sh -c "wget -nv https://golang.org/dl/go1.16.5.linux-amd64.tar.gz" | ||
|
||
sh -c "tar -zxvf go1.16.5.linux-amd64.tar.gz" | ||
|
||
export GOROOT=$PWD | ||
|
||
export GOPATH=$GOROOT/go | ||
|
||
export GOBIN=$GOPATH/bin | ||
|
||
export PATH=$PATH:$GOBIN | ||
|
||
sh -c "wget -nv https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-darwin-amd64.zip" | ||
|
||
sh -c "unzip etcd-v3.5.0-darwin-amd64.zip" | ||
|
||
sh -c "mv etcd-v3.5.0-darwin-amd64/etcd* $GOBIN" | ||
|
||
sh -c "nohup etcd >> run.log 2>&1 &" |
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,39 @@ | ||
name: "UTTest" | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: | ||
- main | ||
env: | ||
VERSION: 0.6.0-SNAPSHOT | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Unit-Test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: [ 8 ] | ||
python-version: [ "3.7" ] | ||
os: [ ubuntu-latest, macos-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Environmet Dependence | ||
uses: ./.github/actions/dependence | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
java: ${{ matrix.java }} | ||
|
||
- name: Run ZooKeeper | ||
uses: ./.github/actions/zookeeperRunner | ||
|
||
- name: Run ETCD | ||
uses: ./.github/actions/etcdRunner | ||
|
||
- name: Test with Maven | ||
run: mvn clean package -pl core -am |
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
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
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
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
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
Oops, something went wrong.