Skip to content

Commit

Permalink
fix db bug
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Oct 7, 2021
1 parent d930adb commit bb64e46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-db/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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: |
Expand Down

0 comments on commit bb64e46

Please sign in to comment.