File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed
Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1717 env :
1818 POSTGRES_USER : postgres
1919 POSTGRES_PASSWORD : postgres
20- POSTGRES_DB : a2a_test
2120 ports :
2221 - 5432:5432
22+ volumes :
23+ - ${{ github.workspace }}/tests/docker/postgres:/docker-entrypoint-initdb.d
24+ mysql :
25+ image : mysql:8.0
26+ env :
27+ MYSQL_ROOT_PASSWORD : root
28+ ports :
29+ - 3306:3306
30+ volumes :
31+ - ${{ github.workspace }}/tests/docker/mysql:/docker-entrypoint-initdb.d
32+ options : >-
33+ --health-cmd="mysqladmin ping -h localhost -u root -proot" --health-interval=10s --health-timeout=5s --health-retries=5
2334
2435 strategy :
2536 matrix :
@@ -31,11 +42,10 @@ jobs:
3142 uses : actions/setup-python@v5
3243 with :
3344 python-version : ${{ matrix.python-version }}
34- - name : Set postgres for tests
35- run : |
36- sudo apt-get update && sudo apt-get install -y postgresql-client
37- PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d a2a_test -f ${{ github.workspace }}/tests/docker/postgres/init.sql
38- echo "POSTGRES_TEST_DSN=postgresql+asyncpg://postgres:postgres@localhost:5432/a2a_test" >> $GITHUB_ENV
45+ - name : Set up databases for tests
46+ run : |
47+ echo "POSTGRES_TEST_DSN=postgresql+asyncpg://a2a:a2a_password@localhost:5432/a2a_test" >> $GITHUB_ENV
48+ echo "MYSQL_TEST_DSN=mysql+aiomysql://a2a:a2a_password@localhost:3306/a2a_test" >> $GITHUB_ENV
3949
4050 - name : Install uv
4151 uses : astral-sh/setup-uv@v6
Original file line number Diff line number Diff line change 1+ -- Create a dedicated user for the application
2+ CREATE USER a2a WITH PASSWORD ' a2a_password' ;
3+
4+ -- Create the tasks database
5+ CREATE DATABASE a2a_test ;
6+
7+ GRANT ALL PRIVILEGES ON DATABASE a2a_test TO a2a;
8+
Original file line number Diff line number Diff line change 22CREATE USER a2a WITH PASSWORD ' a2a_password' ;
33
44-- Create the tasks database
5- CREATE DATABASE a2a_tasks ;
5+ CREATE DATABASE a2a_test ;
66
77GRANT ALL PRIVILEGES ON DATABASE a2a_test TO a2a;
88
You can’t perform that action at this time.
0 commit comments