-
Notifications
You must be signed in to change notification settings - Fork 68
64 lines (63 loc) · 1.73 KB
/
ci-postgresql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI Postgresql
on:
pull_request:
branches:
- master
concurrency:
group: ci-postgresql-${{ github.head_ref }}
cancel-in-progress: true
jobs:
minitest:
runs-on: ubuntu-latest
name: CI Postgresql Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} / Adapter ${{ matrix.adapter }}
services:
postgres:
image: 'postgres:16-alpine'
ports:
- '5432'
env:
POSTGRES_USER: with_advisory
POSTGRES_PASSWORD: with_advisory_pass
POSTGRES_DB: with_advisory_lock_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby:
# - '3.2'
# - '3.1'
# - '3.0'
# - '2.7'
- '3.3'
- 'truffleruby'
rails:
- 7.1
- "7.0"
- 6.1
adapter:
- postgres
include:
- ruby: jruby
rails: 6.1
adapter: jdbcpostgresql
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: latest
env:
BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.rails }}.gemfile
- name: Test
env:
BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.rails }}.gemfile
DATABASE_URL: ${{ matrix.adapter }}://with_advisory:with_advisory_pass@localhost:${{ job.services.postgres.ports[5432] }}/with_advisory_lock_test
WITH_ADVISORY_LOCK_PREFIX: ${{ github.run_id }}
run: bundle exec rake