Skip to content

Commit

Permalink
ci: add compatibility test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kree0 authored and roseboy-liu committed Jan 3, 2024
1 parent dd6a17b commit 8269f8f
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_package_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ permissions:

on:
push:
branches: [ "LTS/2.3" ]
tags:
- v[0-9]+.*
workflow_dispatch:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/community-tag_docker_build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: community-tag docker build and push

on:
push:
branches: [ "LTS/2.3" ]
tags:
- v[0-9]+.*
workflow_dispatch:
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/compatibility_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Compatibility testing

on:
push:
branches: [ "LTS/2.3" ]
tags:
- v[0-9]+.*
workflow_dispatch: {}

jobs:
linux:
name: linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
TARGETPLATFORM="linux/amd64" bash ./.github/tools/install_dependencies.sh
- name: Run and test
shell: bash
run: |
set -e
cargo run --profile test-ci --package main --bin cnosdb -- run --config config/config_8902.toml -M singleton &
until curl -s -G http:https://127.0.0.1:8902/api/v1/ping
do
sleep 5
done
echo 'cnosdb successfully started'
cargo run --package test
cargo run --package sqllogicaltests
macos:
name: macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
TARGETPLATFORM="darwin" bash ./.github/tools/install_dependencies.sh
- name: Run and test
shell: bash
run: |
set -e
cargo run --profile test-ci --package main --bin cnosdb -- run --config config/config_8902.toml -M singleton &
until curl -s -G http:https://127.0.0.1:8902/api/v1/ping
do
sleep 5
done
echo 'cnosdb successfully started'
cargo run --package test
cargo run --package sqllogicaltests
windows:
name: windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
shell: bash
run: |
TARGETPLATFORM="windows/amd64" bash ./.github/tools/install_dependencies.sh
- name: Run and test
run: |
cargo build --profile test-ci --package main --bin cnosdb
Copy-Item -Path .\target\test-ci\cnosdb.exe -Destination .\cnosdb.exe
cargo clean
.\cnosdb.exe run --config config/config_8902.toml -M singleton &
while ($true) {
try {
Invoke-WebRequest -Method GET -Uri http:https://127.0.0.1:8902/api/v1/ping
break
}
catch {
Start-Sleep -Seconds 5
}
}
echo 'cnosdb successfully started'

0 comments on commit 8269f8f

Please sign in to comment.