name: Integration Tests on: push: branches: ['main', 'changeset-release/main'] pull_request: jobs: mysql_integration: name: Emigrate MySQL integration tests timeout-minutes: 15 runs-on: ubuntu-latest env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} DO_NOT_TRACK: 1 services: mysql: image: mysql:8.0 env: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: emigrate MYSQL_USER: emigrate MYSQL_PASSWORD: emigrate ports: - 3306:3306 options: --health-cmd="mysqladmin ping -h localhost" --health-interval=10s --health-timeout=5s --health-retries=5 steps: - name: Check out code uses: actions/checkout@v4 with: fetch-depth: 2 - uses: pnpm/action-setup@v4.0.0 - name: Setup Node.js environment uses: actions/setup-node@v4 with: node-version: 22.15.0 cache: 'pnpm' - name: Install dependencies run: pnpm install - name: Wait for MySQL to be ready run: | for i in {1..30}; do nc -z localhost 3306 && echo "MySQL is up!" && break echo "Waiting for MySQL..." sleep 2 done - name: Build package run: pnpm build --filter @emigrate/mysql - name: Integration Tests env: MYSQL_HOST: '127.0.0.1' MYSQL_PORT: 3306 run: pnpm --filter @emigrate/mysql integration