From 1afafd635820c0877c0473791b4d267c3e28e963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=90?= Date: Thu, 19 Sep 2024 07:21:17 +0800 Subject: [PATCH] feat: fix macOS CI error (#99) * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml * Update ci.yml --- .github/workflows/ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c390bce..13f368a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,23 +50,20 @@ jobs: brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done brew update - brew uninstall --ignore-dependencies node - brew install node@18 - brew link --overwrite node@18 - brew upgrade + brew install postgresql mariadb sqlite brew services start postgresql - brew install mariadb@10.5 sqlite # pg_ctl -D /usr/local/var/postgres start sleep 3 createuser casbin_rs createdb casbin psql postgres -c "alter user casbin_rs with encrypted password 'casbin_rs'; grant all privileges on database casbin to casbin_rs;" - echo "/usr/local/opt/mariadb@10.5/bin" >> $GITHUB_PATH - /usr/local/opt/mariadb@10.5/bin/mysql_install_db - /usr/local/opt/mariadb@10.5/bin/mysql.server start + #echo "/usr/local/opt/mariadb@10.5/bin" >> $GITHUB_PATH + #/usr/local/opt/mariadb@10.5/bin/mysql_install_db + #/usr/local/opt/mariadb@10.5/bin/mysql.server start + brew services start mariadb sleep 3 - /usr/local/opt/mariadb@10.5/bin/mysql -e "create user 'casbin_rs'@'localhost' identified by 'casbin_rs'; create database casbin; grant all on \`casbin\`.* to 'casbin_rs'@'localhost';" -urunner - echo "MYSQLCLIENT_LIB_DIR=/usr/local/opt/mariadb@10.5/lib" >> $GITHUB_ENV + mysql -e "create user 'casbin_rs'@'localhost' identified by 'casbin_rs'; create database casbin; grant all on \`casbin\`.* to 'casbin_rs'@'localhost';" -urunner + #echo "MYSQLCLIENT_LIB_DIR=/usr/local/opt/mariadb@10.5/lib" >> $GITHUB_ENV - name: Setup PostgreSQL & MySQL & SQLite (for windows) if: matrix.os == 'windows-latest'