Skip to content

Commit b00badf

Browse files
authored
Merge pull request #145 from fluent/update-ci
Update CI
2 parents c179334 + c34bdaf commit b00badf

File tree

2 files changed

+49
-19
lines changed

2 files changed

+49
-19
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: linux
2+
on:
3+
schedule:
4+
- cron: '11 23 * * 0'
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
continue-on-error: ${{ matrix.experimental }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
ruby: [ 'head' ]
15+
postgres: [ '16', '15', '14', '13', '12' ]
16+
os:
17+
- ubuntu-latest
18+
experimental: [true]
19+
services:
20+
postgres:
21+
image: postgres:${{ matrix.postgres }}
22+
ports:
23+
- 5432:5432
24+
env:
25+
POSTGRES_USER: postgres
26+
POSTGRES_PASSWORD: password
27+
POSTGRES_DB: test
28+
options: >-
29+
--health-cmd pg_isready
30+
--health-interval 10s
31+
--health-timeout 5s
32+
--health-retries 5
33+
name: Ruby ${{ matrix.ruby }} with PostgreSQL ${{ matrix.postgres }} unit testing on ${{ matrix.os }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: ${{ matrix.ruby }}
39+
bundler-cache: true
40+
- name: prepare database
41+
env:
42+
PGPASSWORD: password
43+
run: |
44+
psql -h localhost -p 5432 -U postgres -c "CREATE ROLE fluentd WITH LOGIN ENCRYPTED PASSWORD 'fluentd';"
45+
psql -h localhost -p 5432 -U postgres -c "CREATE DATABASE fluentd_test OWNER fluentd;"
46+
- name: unit testing
47+
run: bundle exec rake test

.github/workflows/linux.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,11 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
ruby: [ '3.2', '3.1', '3.0', '2.7' ]
16-
postgres: [ '15', '14', '13', '12', '11' ]
15+
ruby: [ '3.3', '3.2', '3.1', '3.0', '2.7' ]
16+
postgres: [ '16', '15', '14', '13', '12' ]
1717
os:
1818
- ubuntu-latest
1919
experimental: [false]
20-
include:
21-
- ruby: head
22-
postgres: '14'
23-
os: ubuntu-latest
24-
experimental: true
25-
- ruby: head
26-
postgres: '13'
27-
os: ubuntu-latest
28-
experimental: true
29-
- ruby: head
30-
postgres: '12'
31-
os: ubuntu-latest
32-
experimental: true
33-
- ruby: head
34-
postgres: '11'
35-
os: ubuntu-latest
36-
experimental: true
3720
services:
3821
postgres:
3922
image: postgres:${{ matrix.postgres }}

0 commit comments

Comments
 (0)