ankane / setup-mysql

The missing action for MySQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup-mysql

The missing action for MySQL πŸŽ‰

  • Faster (with the default version) and simpler than containers
  • Works on Linux, Mac, and Windows
  • Supports different versions

Build Status

Getting Started

Add it as a step to your workflow

      - uses: ankane/setup-mysql@v1

Versions

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 }}

Options

Create a database

      - uses: ankane/setup-mysql@v1
        with:
          database: testdb

Extra Steps

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

Related Actions

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

About

The missing action for MySQL

License:MIT License


Languages

Language:JavaScript 100.0%