fix db bug
This commit is contained in:
parent
d930adbd56
commit
bb64e46549
2 changed files with 4 additions and 6 deletions
2
.github/actions/setup-db/entrypoint.sh
vendored
2
.github/actions/setup-db/entrypoint.sh
vendored
|
|
@ -50,7 +50,7 @@ startPostgres() {
|
|||
|
||||
startSQLite3() {
|
||||
echo "Start SQLite3"
|
||||
echo "DB_HOST=file:$XIANG_ROOT/db/$INPUT_DB.db" >> $GITHUB_ENV
|
||||
echo "DB_HOST=$INPUT_DB.db" >> $GITHUB_ENV
|
||||
echo "DB_DRIVER=sqlite3" >> $GITHUB_ENV
|
||||
echo "DB_NAME=sqlite3" >> $GITHUB_ENV
|
||||
echo "$DB_HOST"
|
||||
|
|
|
|||
8
.github/workflows/unit-test.yml
vendored
8
.github/workflows/unit-test.yml
vendored
|
|
@ -79,8 +79,8 @@ jobs:
|
|||
uses: ./.github/actions/setup-db
|
||||
with:
|
||||
kind: "${{ matrix.db }}"
|
||||
db: "xun"
|
||||
user: "xun"
|
||||
db: "xiang"
|
||||
user: "xiang"
|
||||
password: ${{ secrets.UNIT_PASS }}
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
|
|
@ -99,7 +99,6 @@ jobs:
|
|||
PASSWORD: ${{ secrets.UNIT_PASS }}
|
||||
run: |
|
||||
sudo echo "127.0.0.1 local.iqka.com" | sudo tee -a /etc/hosts
|
||||
sudo echo "127.0.0.1 t2.iqka.com" | sudo tee -a /etc/hosts
|
||||
echo "XIANG_DB_DRIVER=$DB_DRIVER" >> $GITHUB_ENV
|
||||
echo "GITHUB_WORKSPACE:\n" && ls -l $GITHUB_WORKSPACE
|
||||
|
||||
|
|
@ -108,13 +107,12 @@ jobs:
|
|||
elif [ "$DB_DRIVER" = "postgres" ]; then
|
||||
echo "XIANG_DB_PRIMARY=postgres://$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
|
||||
else
|
||||
echo "XIANG_DB_PRIMARY=$DB_HOST" >> $GITHUB_ENV
|
||||
echo "XIANG_DB_PRIMARY=$XIANG_ROOT/$DB_HOST" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
echo ".:\n" && ls -l .
|
||||
echo "..:\n" && ls -l ..
|
||||
ping -c 1 -t 1 local.iqka.com
|
||||
ping -c 1 -t 1 t2.iqka.com
|
||||
|
||||
- name: Run Test
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue