Skip to content

Commit c67848b

Browse files
committed
ci: install DB clients and run integration suite on Ubuntu
1 parent 51537ba commit c67848b

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,23 @@ jobs:
4040
run: go vet ./...
4141
- name: go test
4242
run: go test ./...
43+
# Integration tests use testcontainers, which needs a Docker daemon.
44+
# Only ubuntu-latest runners have Docker available by default, so the
45+
# DB client install and integration suite are scoped to Ubuntu.
46+
# macOS/Windows run unit tests only (the integration-tagged files that
47+
# shell out to the client binaries are tagged out of the unit build).
48+
- name: Install DB client tools (integration, Ubuntu only)
49+
if: matrix.os == 'ubuntu-latest'
50+
run: |
51+
sudo apt-get update
52+
# postgresql-client -> pg_dump/pg_restore
53+
# mysql-client -> mysqldump/mysql
54+
# mariadb-client -> mariadb-dump/mariadb
55+
# NOTE: mysql-client and mariadb-client can conflict on some Ubuntu
56+
# releases (both provide the mysql* binaries via alternatives). If apt
57+
# reports a conflict in CI, split them or drop mysql-client (mariadb-client
58+
# provides mysql-compatible binaries) as a one-line follow-up.
59+
sudo apt-get install -y postgresql-client mysql-client mariadb-client
60+
- name: Integration tests (Ubuntu only — needs Docker)
61+
if: matrix.os == 'ubuntu-latest'
62+
run: go test -tags=integration ./...

0 commit comments

Comments
 (0)