-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.54 KB
/
test_ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
# options: >-
# --health-cmd "curl -fs http://localhost:8000/v1/health || exit 1"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
ports:
- 8000:8000
- 9000:9000
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
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 }}