Skip to content

Make DB connection use PingContext #65

Make DB connection use PingContext

Make DB connection use PingContext #65

Workflow file for this run

name: Integration Test
on:
pull_request:
branches:
- main
jobs:
integration-test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7.30
env:
MYSQL_DATABASE: integration
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD: ''
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
- name: Create Integration Databases
run: |
mysql -h127.0.0.1 -uroot -e "create database m1_integration"
mysql -h127.0.0.1 -uroot -e "create database m2_integration"
- name: Import Fixtures
run: |
mysql -h127.0.0.1 -uroot m1_integration < $GITHUB_WORKSPACE/fixture/magento1_integration/config.sql
mysql -h127.0.0.1 -uroot m2_integration < $GITHUB_WORKSPACE/fixture/magento2_integration/config.sql
- name: Run Integration Tests
run: go test --tags=integration