Giter Club home page Giter Club logo

setup-mysql's Introduction

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:

setup-mysql's People

Contributors

ankane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

setup-mysql's Issues

Ideas

Ideas

  • Add user option
  • Add time-zone-support option - time-zone-support branch

8.0 no longer working on windows-latest (2022)

Possibly due to this change? actions/runner-images#8398

https://github.com/tgstation/tgstation-server/actions/runs/6422137133/job/17470833198

2023-10-06T15:26:35.0706534Z ##[group]Run ankane/setup-mysql@v1
2023-10-06T15:26:35.0707152Z with:
2023-10-06T15:26:35.0707460Z env:
2023-10-06T15:26:35.0707799Z   TGS_DOTNET_VERSION: 6.0.x
2023-10-06T15:26:35.0708923Z   TGS_TEST_GITHUB_TOKEN: ***
2023-10-06T15:26:35.0709593Z   TGS_RELEASE_NOTES_TOKEN: ***
2023-10-06T15:26:35.0710080Z   WINGET_PUSH_TOKEN: ***
2023-10-06T15:26:35.0710588Z   PACKAGING_PRIVATE_KEY_PASSPHRASE: ***
2023-10-06T15:26:35.0711045Z   CODECOV_TOKEN: ***
2023-10-06T15:26:35.0711529Z   DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet
2023-10-06T15:26:35.0712001Z   General__UseBasicWatchdog: true
2023-10-06T15:26:35.0712880Z ##[endgroup]
2023-10-06T15:26:35.3050122Z curl -Ls -o mysql.zip https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.32-winx64.zip
2023-10-06T15:26:40.2646979Z unzip -q mysql.zip
2023-10-06T15:26:53.5806609Z node:internal/fs/utils:351
2023-10-06T15:26:53.5807281Z     throw err;
2023-10-06T15:26:53.5807599Z     ^
2023-10-06T15:26:53.5808083Z 
2023-10-06T15:26:53.5809276Z Error: EEXIST: file already exists, mkdir 'C:\Program Files\MySQL'
2023-10-06T15:26:53.5810220Z     at Object.mkdirSync (node:fs:1414:3)
2023-10-06T15:26:53.5811223Z     at Object.<anonymous> (D:\a\_actions\ankane\setup-mysql\v1\index.js:73:6)
2023-10-06T15:26:53.5811980Z     at Module._compile (node:internal/modules/cjs/loader:1233:14)
2023-10-06T15:26:53.5812735Z     at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
2023-10-06T15:26:53.5813456Z     at Module.load (node:internal/modules/cjs/loader:1091:32)
2023-10-06T15:26:53.5814135Z     at Module._load (node:internal/modules/cjs/loader:938:12)
2023-10-06T15:26:53.5815102Z     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
2023-10-06T15:26:53.5815856Z     at node:internal/main/run_main_module:23:47 {
2023-10-06T15:26:53.5816556Z   errno: -4075,
2023-10-06T15:26:53.5817145Z   syscall: 'mkdir',
2023-10-06T15:26:53.5817777Z   code: 'EEXIST',
2023-10-06T15:26:53.5821588Z   path: 'C:\\Program Files\\MySQL'
2023-10-06T15:26:53.5822223Z }
2023-10-06T15:26:53.5822753Z 
2023-10-06T15:26:53.5823048Z Node.js v20.5.0
2023-10-06T15:26:53.6352003Z Cleaning up orphan processes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.