Skip to content

ci: add Ruby 4.0

ci: add Ruby 4.0 #24

Workflow file for this run

name: linux
on:
- push
- pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0' ]
postgres: [ '9', '10', '11', '12', '13' ]
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 }} unit testing on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
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 CREATEDB password 'fluentd';"
psql -h localhost -p 5432 -U postgres -c "create database pgjsontest owner fluentd encoding 'utf-8'" -U postgres
- name: unit testing
env:
CI: true
run: |
bundle exec rake test