The missing action for MySQL π
- Faster (with the default version) and simpler than containers
- Works on Linux, Mac, and Windows
- Supports different versions
Add it as a step to your workflow
- uses: ankane/setup-mysql@v1
Specify a version
- uses: ankane/setup-mysql@v1
with:
mysql-version: 8.0
Currently supports
Version | 8.0 |
5.7 |
---|---|---|
ubuntu-22.04 |
default | |
ubuntu-20.04 |
default | |
macos-14 |
default | β |
macos-13 |
default | β |
macos-12 |
default | β |
macos-11 |
default | β |
windows-2022 |
default | β |
windows-2019 |
default | β |
Test against multiple versions
strategy:
matrix:
mysql-version: [8.0, 5.7]
steps:
- uses: ankane/setup-mysql@v1
with:
mysql-version: ${{ matrix.mysql-version }}
Create a database
- uses: ankane/setup-mysql@v1
with:
database: testdb
Run queries
- run: mysql -D testdb -e 'SELECT VERSION()'
Install time zone support
- run: mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features