From 378df8e48b2c698534b40797011e9b8fc34e610c Mon Sep 17 00:00:00 2001 From: hantmac Date: Wed, 18 Oct 2023 14:43:00 +0800 Subject: [PATCH 1/2] feat: add CI test workflow --- .github/workflows/test.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6b7fd7e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,51 @@ +name: Tests + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +jobs: + test: + runs-on: ubuntu-latest + services: + databend: + image: datafuselabs/databend + env: + QUERY_DEFAULT_USER: databend + QUERY_DEFAULT_PASSWORD: databend + MINIO_ENABLED: true + ports: + - 8000:8000 + - 9000:9000 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + cache: 'maven' +# gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import +# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase + + - name: Verify Service Running + run: | + sleep 30 + cid=$(docker ps -a | grep databend | cut -d' ' -f1) + docker logs ${cid} + curl -u databend:databend --request POST localhost:8000/v1/query --header 'Content-Type:application/json' --data-raw '{"sql":"select 1"}' + + - name: Run Maven clean deploy with release profile + run: mvn clean test + env: +# MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} From e417c671b55ff6ee8699e88668ef148a368df8b5 Mon Sep 17 00:00:00 2001 From: hantmac Date: Wed, 18 Oct 2023 14:45:04 +0800 Subject: [PATCH 2/2] fix --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b7fd7e..53dbd26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,9 @@ on: push: branches: - main - - master pull_request: branches: - main - - master jobs: test: