Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[D-359] minidusen - Switch to Ubuntu 24.04 image #23

Merged
merged 2 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 35 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
---
name: Tests
'on':

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test_mysql:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

services:
mysql:
image: mysql:5.6
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout
5s --health-retries 5
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 3306:3306

strategy:
fail-fast: false
matrix:
Expand All @@ -35,34 +42,40 @@ jobs:
gemfile: Gemfile.7.2.mysql2
- ruby: 3.3.4
gemfile: Gemfile.8.0.mysql2

env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- 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
mysql -e 'create database IF NOT EXISTS minidusen_test;' -u root --password=password -P 3306 -h 127.0.0.1
- name: Run tests
run: bundle exec rspec

test_pg:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5"
POSTGRES_DB: minidusen_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

strategy:
fail-fast: false
matrix:
Expand All @@ -79,22 +92,16 @@ jobs:
gemfile: Gemfile.7.2.pg
- ruby: 3.3.4
gemfile: Gemfile.8.0.pg

env:
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- 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
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
4 changes: 2 additions & 2 deletions spec/support/database.github.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mysql:
database: test
database: minidusen_test
username: root
password: password
host: 127.0.0.1
port: 3306

postgresql:
database: test
database: minidusen_test
host: localhost
username: postgres
password: postgres
Expand Down