Skip to content

Commit

Permalink
fix: fix CI install luasql error
Browse files Browse the repository at this point in the history
  • Loading branch information
conghuhu committed Aug 15, 2022
1 parent 11dbfcc commit b4ad504
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,17 @@ jobs:
mysql -e 'CREATE DATABASE ${{ env.MYSQL_DB }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASSWORD }}
luarocks install https://raw.githubusercontent.com/casbin/lua-casbin/master/casbin-1.41.1-1.rockspec
sudo apt install sqlite3 libsqlite3-dev lua-sql-mysql libpq-dev
luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysql/
luarocks install luasql-postgres PGSQL_INCDIR=/usr/include/postgresql/
luarocks install luasql-sqlite3
# install luasql driver
sudo git clone https://github.com/lunarmodules/luasql.git
cd luasql/rockspec
sudo cp ./luasql-mysql-2.6.0-1.rockspec ../luasql-mysql-2.6.0-1.rockspec
sudo cp ./luasql-postgres-2.6.0-1.rockspec ../luasql-postgres-2.6.0-1.rockspec
sudo cp ./luasql-sqlite3-2.6.0-1.rockspec ../luasql-sqlite3-2.6.0-1.rockspec
cd ..
luarocks make luasql-mysql-2.6.0-1.rockspec MYSQL_INCDIR=/usr/include/mysql/
luarocks make luasql-postgres-2.6.0-1.rockspec PGSQL_INCDIR=/usr/include/postgresql/
luarocks make luasql-sqlite3-2.6.0-1.rockspec
cd ..
luarocks install busted
luarocks install busted-htest
luarocks install luacov-coveralls
Expand Down

0 comments on commit b4ad504

Please sign in to comment.