diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..57370551 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index aeb9b1ae..daf2c256 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ 'master', 'release-0-8', 'release-0-9', 'release-0-10' ] + branches: [ 'master', 'release-0-8', 'release-0-9', 'release-0-10', 'v0-11-dev' ] pull_request: branches: ['**'] @@ -10,6 +10,18 @@ jobs: tests: runs-on: ubuntu-latest services: + mysql: + image: mysql + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: test + ports: + - 3306:3306 + options: >- + --health-cmd "mysqladmin ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 postgres: image: postgres env: @@ -26,43 +38,44 @@ jobs: fail-fast: false matrix: ruby: - - 2.6 - - 2.7 + - '3.2' + - '3.1' - '3.0' - - 3.1 - - 3.2 + - '2.7' + - '2.6' rails: - - 7.0.4 - - 6.1.7 - - 6.0.6 - - 5.2.8.1 - - 5.1.7 + - '7.0' + - '6.1' + - '6.0' + - '5.2' + - '5.1' database_url: - - postgresql://postgres:password@localhost:5432/test - sqlite3:test_db + - postgresql://postgres:password@localhost:5432/test + - mysql2://root:root@127.0.0.1:3306/test exclude: - - ruby: 3.2 - rails: 6.0.6 - - ruby: 3.2 - rails: 5.2.8.1 - - ruby: 3.2 - rails: 5.1.7 - - ruby: 3.1 - rails: 6.0.6 - - ruby: 3.1 - rails: 5.2.8.1 - - ruby: 3.1 - rails: 5.1.7 + - ruby: '3.2' + rails: '6.0' + - ruby: '3.2' + rails: '5.2' + - ruby: '3.2' + rails: '5.1' + - ruby: '3.1' + rails: '6.0' + - ruby: '3.1' + rails: '5.2' + - ruby: '3.1' + rails: '5.1' - ruby: '3.0' - rails: 6.0.6 + rails: '6.0' - ruby: '3.0' - rails: 5.2.8.1 + rails: '5.2' - ruby: '3.0' - rails: 5.1.7 - - ruby: 2.6 - rails: 7.0.4 + rails: '5.1' + - ruby: '2.6' + rails: '7.0' - database_url: postgresql://postgres:password@localhost:5432/test - rails: 5.1.7 + rails: '5.1' env: RAILS_VERSION: ${{ matrix.rails }} DATABASE_URL: ${{ matrix.database_url }} @@ -73,7 +86,6 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Install dependencies - run: bundle install --jobs 4 --retry 3 + bundler-cache: true - name: Run tests run: bundle exec rake test diff --git a/Gemfile b/Gemfile index 2535d020..5c866218 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ version = ENV['RAILS_VERSION'] || 'default' platforms :ruby do gem 'pg' + gem 'mysql2' if version.start_with?('4.2', '5.0') gem 'sqlite3', '~> 1.3.13' @@ -26,4 +27,4 @@ when 'default' gem 'railties', '>= 6.0' else gem 'railties', "~> #{version}" -end \ No newline at end of file +end