From 7fd20aea4eafdc482817016fa44f81f21ea06eb3 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sun, 11 Feb 2024 14:02:07 +0100 Subject: [PATCH] test in mysql8 --- .../workflows/{ci-mysql.yml => ci-mysql5.yml} | 2 +- .github/workflows/ci-mysql8.yml | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) rename .github/workflows/{ci-mysql.yml => ci-mysql5.yml} (98%) create mode 100644 .github/workflows/ci-mysql8.yml diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql5.yml similarity index 98% rename from .github/workflows/ci-mysql.yml rename to .github/workflows/ci-mysql5.yml index 226c2b7..a22be88 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql5.yml @@ -1,4 +1,4 @@ -name: CI Mysql +name: CI Mysql 5.7 on: pull_request: branches: diff --git a/.github/workflows/ci-mysql8.yml b/.github/workflows/ci-mysql8.yml new file mode 100644 index 0000000..86728d5 --- /dev/null +++ b/.github/workflows/ci-mysql8.yml @@ -0,0 +1,53 @@ +name: CI Mysql 8.0 +on: + pull_request: + branches: + - master +jobs: + minitest: + runs-on: ubuntu-latest + name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} + services: + mysql: + image: mysql:latest + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e with_advisory='%' -e MYSQL_USER=with_advisory -e MYSQL_PASSWORD=with_advisory_pass -e MYSQL_DATABASE=with_advisory_lock_test --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" + ports: + - "3306:3306" + strategy: + fail-fast: false + matrix: + ruby: + - '3.2' + - '3.1' + - '3.0' + - '2.7' + - '3.3' + - 'truffleruby' + rails: + - 7.1 + - "7.0" + - 6.1 + adapter: + - mysql2://with_advisory:with_advisory_pass@0/with_advisory_lock_test + - trilogy://with_advisory:with_advisory_pass@0/with_advisory_lock_test + include: + - ruby: jruby + rails: 6.1 + adapter: jdbcmysql://with_advisory:with_advisory_pass@0/with_advisory_lock_test + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + rubygems: latest + env: + BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.rails }}.gemfile + - name: Test + env: + BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.rails }}.gemfile + DATABASE_URL: ${{ matrix.adapter }} + WITH_ADVISORY_LOCK_PREFIX: ${{ github.run_id }} + run: bundle exec rake