Skip to content

Bump ruby/setup-ruby from 1.298.0 to 1.299.0 (#166) #102

Bump ruby/setup-ruby from 1.298.0 to 1.299.0 (#166)

Bump ruby/setup-ruby from 1.298.0 to 1.299.0 (#166) #102

Workflow file for this run

name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 1 * *'
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.7
build:
needs: ruby-versions
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
exclude:
- ruby: head
postgres: [ '16', '15', '14', '13', '12' ]
os:
- ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgres }}
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
name: Ruby ${{ matrix.ruby }} with PostgreSQL ${{ matrix.postgres }} unit testing on ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: prepare database
env:
PGPASSWORD: password
run: |
psql -h localhost -p 5432 -U postgres -c "CREATE ROLE fluentd WITH LOGIN ENCRYPTED PASSWORD 'fluentd';"
psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE fluentd_test OWNER fluentd;"
- name: unit testing
run: bundle exec rake test