Giter Club home page Giter Club logo

setup-mariadb's Introduction

setup-mariadb

The missing action for MariaDB ๐ŸŽ‰

  • 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-mariadb@v1

Versions

Specify a version

      - uses: ankane/setup-mariadb@v1
        with:
          mariadb-version: "10.11"

Currently supports

Version 11.2 11.1 11.0 10.11 10.6 10.5
ubuntu-22.04 โœ“ โœ“ โœ“ default
ubuntu-20.04 โœ“ โœ“ โœ“ default โœ“ โœ“
macos-14 โœ“ โœ“ โœ“ default โœ“ โœ“
macos-13 โœ“ โœ“ โœ“ default โœ“ โœ“
macos-12 โœ“ โœ“ โœ“ default โœ“ โœ“
windows-2022 โœ“ โœ“ โœ“ default โœ“ โœ“
windows-2019 โœ“ โœ“ โœ“ default โœ“ โœ“

Test against multiple versions

    strategy:
      matrix:
        mariadb-version: ["11.2", "11.1", "11.0", "10.11"]
    steps:
      - uses: ankane/setup-mariadb@v1
        with:
          mariadb-version: ${{ matrix.mariadb-version }}

Options

Create a database

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

Extra Steps

Run queries

      - run: mysql -D testdb -e 'SELECT VERSION()'

Related Actions

Contributing

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

setup-mariadb's People

Contributors

ankane avatar makigumo avatar

Stargazers

 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-mariadb's Issues

Allow caching the downloaded file.

The download from mariadb sometimes fails and takes about 6 seconds.
The downloaded file could be cached (by using actions/cache inside the setup-mariadb action).

2024-03-10T14:19:47.1780788Z curl -Ls -o mariadb.msi https://downloads.mariadb.com/MariaDB/mariadb-10.11.6/winx64-packages/mariadb-10.11.6-winx64.msi
2024-03-10T14:19:53.8303235Z msiexec /i mariadb.msi SERVICENAME=MariaDB /qn
2024-03-10T14:20:29.1565456Z

Socket connection on Linux supported?

https://github.com/r-dbi/RMariaDB/pull/185/checks?check_run_id=1484154324#step:13:160

On Linux I'm seeing with RMariaDB:

Error: Failed to connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I wonder why mysql commands work, wouldn't they also use the socket by default? Is the socket in a different location?

Per https://mariadb.com/kb/en/missing-mysqldsock-file/#comment_165, do we need

ln -s /tmp/mysql.sock /var/run/mysqld/mysqld.sock

?

Compare with docker option

The readme might do with some pros and cons compared the docker ways of doing this. Some thoughts:

  • speed (my tests show this one slightly slower at around 40 seconds compared to 25)
  • client tools. This approach installs the proper mariadb client executable accessible to the tests
  • avoid collisions. This approach uninstalls mysql which is already installed in github actions.
  • socket connections available (haven't tested yet as to whether that will help with speed or reliability)

Ideas

Ideas

  • Add database and user inputs

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.