all: super_batch7 fixes #363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Database CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| - '**.yml' | |
| - '!**/db_ci.yml' | |
| - 'examples/**' | |
| - 'doc/**' | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - '**.yml' | |
| - '!**/db_ci.yml' | |
| - 'examples/**' | |
| - 'doc/**' | |
| concurrency: | |
| group: db-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| mysql-driver-tests: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: 12345678 | |
| MYSQL_ROOT_HOST: '%' | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -p12345678" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=24 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build V | |
| run: make -j4 && ./v symlink | |
| - name: Install mysql client headers | |
| run: | | |
| .github/workflows/disable_azure_mirror.sh | |
| ./v retry -- sudo apt update | |
| ./v retry -- sudo apt install --quiet -y libmariadb-dev | |
| - name: Run mysql driver tests | |
| run: ./v -d network -d started_mysqld -silent test vlib/db/mysql/ | |
| postgres-driver-tests: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: 12345678 | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd="pg_isready -U postgres -d postgres" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=24 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build V | |
| run: make -j4 && ./v symlink | |
| - name: Install postgres client headers | |
| run: | | |
| .github/workflows/disable_azure_mirror.sh | |
| ./v retry -- sudo apt update | |
| ./v retry -- sudo apt install --quiet -y libpq-dev | |
| - name: Run postgres driver tests | |
| run: ./v -d network -d started_postgres -silent test vlib/db/pg/ | |
| mssql-driver-tests: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| services: | |
| mssql: | |
| image: mcr.microsoft.com/mssql/server:2022-latest | |
| env: | |
| ACCEPT_EULA: Y | |
| MSSQL_PID: Developer | |
| MSSQL_SA_PASSWORD: Vlang12345678! | |
| ports: | |
| - 1433:1433 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build V | |
| run: make -j4 && ./v symlink | |
| - name: Install ODBC dependencies | |
| run: | | |
| .github/workflows/disable_azure_mirror.sh | |
| [ -f /usr/share/keyrings/microsoft-prod.gpg ] || curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --batch --no-tty --dearmor -o /usr/share/keyrings/microsoft-prod.gpg | |
| curl -fsSL https://packages.microsoft.com/config/ubuntu/24.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
| ./v retry -- sudo apt update | |
| sudo ACCEPT_EULA=Y apt install --quiet -y msodbcsql18 unixodbc-dev | |
| - name: Wait for sql server | |
| run: | | |
| for _ in $(seq 1 60); do | |
| if (echo > /dev/tcp/127.0.0.1/1433) >/dev/null 2>&1; then | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| exit 1 | |
| - name: Run mssql driver tests | |
| env: | |
| VMSSQL_CONN_STR: 'Driver={ODBC Driver 18 for SQL Server};Server=127.0.0.1;Port=1433;UID=sa;PWD=Vlang12345678!;Database=master;TrustServerCertificate=yes' | |
| run: ./v -d network -d started_mssql -silent test vlib/db/mssql/ |