-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: modify project structure and add github workflow (#25)
* modify project structure and add github workflow for java example * modify group name * move yml to workflows dir * fix image name * update java example * update java docs * update golang example * modify example file name * remove assert * update python example * update ci config * remove branch filter * update readme
- Loading branch information
Showing
62 changed files
with
431 additions
and
580 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,87 @@ | ||
name: CI | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
- '.*' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
- '.*' | ||
concurrency: | ||
group: ${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
golang: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: [ "go-sql-driver" ] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Set Go env | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
- name: Start docker container | ||
timeout-minutes: 5 | ||
run: | | ||
docker run --name oceanbase-ce --network host -e MODE=slim -e FASTBOOT=true -d oceanbase/oceanbase-ce | ||
eval 'while ! docker logs oceanbase-ce | grep -q "boot success!"; do echo "booting..."; sleep 10; done' | ||
echo "boot success!" | ||
- name: Run example for ${{ matrix.module }} | ||
run: | | ||
cd ob-example-golang/${{ matrix.module }} | ||
sh run.sh | ||
java: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: [ "mysql-connector-java", "oceanbase-client" ] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Set JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'zulu' | ||
cache: 'maven' | ||
- name: Start docker container | ||
timeout-minutes: 5 | ||
run: | | ||
docker run --name oceanbase-ce --network host -e MODE=slim -e FASTBOOT=true -d oceanbase/oceanbase-ce | ||
eval 'while ! docker logs oceanbase-ce | grep -q "boot success!"; do echo "booting..."; sleep 10; done' | ||
echo "boot success!" | ||
- name: Run example for ${{ matrix.module }} | ||
run: | | ||
cd ob-example-java/${{ matrix.module }} | ||
sh run.sh | ||
python: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: [ "pymysql" ] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Start docker container | ||
timeout-minutes: 5 | ||
run: | | ||
docker run --name oceanbase-ce --network host -e MODE=slim -e FASTBOOT=true -d oceanbase/oceanbase-ce | ||
eval 'while ! docker logs oceanbase-ce | grep -q "boot success!"; do echo "booting..."; sleep 10; done' | ||
echo "boot success!" | ||
- name: Run example for ${{ matrix.module }} | ||
run: | | ||
cd ob-example-python/${{ matrix.module }} | ||
sh run.sh |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.