@@ -15,11 +15,24 @@ jobs:
1515 postgres :
1616 image : postgres:15-alpine
1717 env :
18- POSTGRES_USER : postgres
19- POSTGRES_PASSWORD : postgres
18+ POSTGRES_USER : a2a
19+ POSTGRES_PASSWORD : a2a_password
2020 POSTGRES_DB : a2a_test
2121 ports :
2222 - 5432:5432
23+ options : >-
24+ --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
25+ mysql :
26+ image : mysql:8.0
27+ env :
28+ MYSQL_ROOT_PASSWORD : root
29+ MYSQL_DATABASE : a2a_test
30+ MYSQL_USER : a2a
31+ MYSQL_PASSWORD : a2a_password
32+ ports :
33+ - 3306:3306
34+ options : >-
35+ --health-cmd="mysqladmin ping -h localhost -u root -proot" --health-interval=10s --health-timeout=5s --health-retries=5
2336
2437 strategy :
2538 matrix :
@@ -31,20 +44,19 @@ jobs:
3144 uses : actions/setup-python@v5
3245 with :
3346 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 }}/docker/postgres/init.sql
38- export POSTGRES_TEST_DSN="postgresql+asyncpg://postgres:postgres@localhost:5432/a2a_test"
47+ - name : Set up test environment variables
48+ run : |
49+ echo "POSTGRES_TEST_DSN=postgresql+asyncpg://a2a:a2a_password@localhost:5432/a2a_test" >> $GITHUB_ENV
50+ echo "MYSQL_TEST_DSN=mysql+aiomysql://a2a:a2a_password@localhost:3306/a2a_test" >> $GITHUB_ENV
3951
4052 - name : Install uv
4153 uses : astral-sh/setup-uv@v6
4254 - name : Add uv to PATH
4355 run : |
4456 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
4557 - name : Install dependencies
46- run : uv sync --dev --extra sql
58+ run : uv sync --dev --extra sql --extra encryption --extra grpc
4759 - name : Run tests and check coverage
48- run : uv run pytest --cov=a2a --cov-report=xml --cov-fail-under=90
60+ run : uv run pytest --cov=a2a --cov-report=xml --cov-fail-under=89
4961 - name : Show coverage summary in log
5062 run : uv run coverage report
0 commit comments