fix test
This commit is contained in:
parent
ef1d3d85bd
commit
638ad9c33e
1 changed files with 16 additions and 15 deletions
31
.github/workflows/unit-test.yml
vendored
31
.github/workflows/unit-test.yml
vendored
|
|
@ -95,33 +95,34 @@ jobs:
|
|||
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
|
||||
|
||||
- name: Setup ENV & Host
|
||||
env:
|
||||
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
|
||||
|
||||
if [ "$DB_DRIVER" = "mysql" ]; then
|
||||
echo "XIANG_DB_PRIMARY=$DB_USER:$PASSWORD@$DB_HOST" >> $GITHUB_ENV
|
||||
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
|
||||
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
|
||||
env:
|
||||
PASSWORD: ${{ secrets.UNIT_PASS }}
|
||||
run: |
|
||||
if [ "$DB_DRIVER" = "mysql" ]; then
|
||||
XIANG_DB_PRIMARY="$DB_USER:$PASSWORD@$DB_HOST" make test
|
||||
elif [ "$DB_DRIVER" = "postgres" ]; then
|
||||
XIANG_DB_PRIMARY="postgres://$DB_USER:$PASSWORD@$DB_HOST" make test
|
||||
else
|
||||
XIANG_DB_PRIMARY="$DB_HOST" make test
|
||||
fi
|
||||
|
||||
# make vet
|
||||
# make fmt-check
|
||||
# make misspell-check
|
||||
# make plugin
|
||||
# make migrate
|
||||
make vet
|
||||
make fmt-check
|
||||
make misspell-check
|
||||
make plugin
|
||||
make migrate
|
||||
# make test
|
||||
|
||||
- name: Codecov Report
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue