Skip to content

Commit

Permalink
ci: Test mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
timabell committed Jan 28, 2024
1 parent e903b14 commit 3319311
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,44 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ssetest
mysql:
image: mysql:8.3
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: omgroot
MYSQL_DATABASE: ssetest
MYSQL_USER: ssetestusr
MYSQL_PASSWORD: ssetestusrpass

steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Apt packages
run: sudo apt install sqlite3 postgresql-client gcc-mingw-w64-x86-64 mysql-client
- name: install go-junit-report
run: go install github.com/jstemmer/go-junit-report/v2@latest
- uses: actions/checkout@v4
- name: Apt packages
run: sudo apt install sqlite3 postgresql-client gcc-mingw-w64-x86-64
- name: Install dependencies
run: go get .
- name: Test - mysql
env:
schemaexplorer_driver: mysql
schemaexplorer_live: false
schemaexplorer_mysql_database: ssetest
schemaexplorer_mysql_host: 127.0.0.1
schemaexplorer_mysql_user: ssetestusr
schemaexplorer_mysql_password: ssetestusrpass
run: |
pushd .
cd mysql
mysql -h 127.0.0.1 -u root -pomgroot ssetest < test-db.sql
popd
go clean -testcache
go test -json sse_test.go \
2>&1 | go-junit-report -parser gojson -iocopy -out results-mysql-${{ matrix.go-version }}.xml
- name: Test - sqlite flags
run: |
pushd .
Expand Down

0 comments on commit 3319311

Please sign in to comment.