Skip to content

[D-348] minidusen: Gems und Rails 8 (und Ruby 3.4) #36

[D-348] minidusen: Gems und Rails 8 (und Ruby 3.4)

[D-348] minidusen: Gems und Rails 8 (und Ruby 3.4) #36

Workflow file for this run

---
name: Tests
'on':
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test_mysql:
runs-on: ubuntu-20.04
services:
mysql:
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout
5s --health-retries 5
ports:
- 3306:3306
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.7.8
gemfile: Gemfile.6.1.mysql2
- ruby: 3.2.0
gemfile: Gemfile.6.1.mysql2
- ruby: 3.2.0
gemfile: Gemfile.7.0.mysql2
- ruby: 3.2.0
gemfile: Gemfile.7.1.mysql2
- ruby: 3.3.4
gemfile: Gemfile.7.2.mysql2
- ruby: 3.3.4
gemfile: Gemfile.8.0.mysql2
env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
steps:
- uses: actions/checkout@v2
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
- name: Setup database
run: |
mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
- name: Bundle
run: |
gem install bundler:1.17.3
bundle install --no-deployment
- name: Run tests
run: bundle exec rspec
test_pg:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5"
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.7.8
gemfile: Gemfile.6.1.pg
- ruby: 3.2.0
gemfile: Gemfile.6.1.pg
- ruby: 3.2.0
gemfile: Gemfile.7.0.pg
- ruby: 3.2.0
gemfile: Gemfile.7.1.pg
- ruby: 3.3.4
gemfile: Gemfile.7.2.pg
- ruby: 3.3.4
gemfile: Gemfile.8.0.pg
env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
steps:
- uses: actions/checkout@v2
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
- name: Setup database
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client
PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
- name: Bundle
run: |
gem install bundler:1.17.3
bundle install --no-deployment
- name: Run tests
run: bundle exec rspec