Skip to content

Commit 854f929

Browse files
committed
Merge 'upstream/master' v9.1.1
2 parents 1000b5d + 0f3b0f6 commit 854f929

118 files changed

Lines changed: 3045 additions & 2654 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copy this file to .env and update with your database connection strings
2+
3+
# PostgreSQL primary database
4+
DATABASE_URL_PG=postgresql://closure_tree:closure_tree_pass@127.0.0.1:5434/closure_tree_test
5+
6+
# MySQL secondary database
7+
DATABASE_URL_MYSQL=mysql2://closure_tree:closure_tree_pass@127.0.0.1:3367/closure_tree_test
8+
9+
# SQLite database (optional, in-memory by default)
10+
# DATABASE_URL_SQLITE3=sqlite3:closure_tree_test.db

.github/workflows/ci.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: CI
32

43
on:
@@ -10,49 +9,48 @@ on:
109
- master
1110

1211
jobs:
13-
rspec:
12+
test:
1413
runs-on: ubuntu-latest
14+
1515
services:
16-
mysql:
17-
image: mysql/mysql-server
18-
ports:
19-
- "3306:3306"
20-
env:
21-
MYSQL_ROOT_PASSWORD: root
22-
MYSQL_DATABASE: closure_tree_test
23-
MYSQL_ROOT_HOST: '%'
2416
postgres:
25-
image: 'postgres'
26-
ports: ['5432:5432']
17+
image: postgres:17-alpine
18+
ports:
19+
- 5432:5432
2720
env:
21+
POSTGRES_USER: postgres
2822
POSTGRES_PASSWORD: postgres
2923
POSTGRES_DB: closure_tree_test
3024
options: >-
3125
--health-cmd pg_isready
3226
--health-interval 10s
3327
--health-timeout 5s
3428
--health-retries 5
29+
30+
mysql:
31+
image: mysql:8
32+
ports:
33+
- 3306:3306
34+
env:
35+
MYSQL_DATABASE: closure_tree_test
36+
MYSQL_ROOT_PASSWORD: root
37+
options: >-
38+
--health-cmd="mysqladmin ping"
39+
--health-interval=10s
40+
--health-timeout=5s
41+
--health-retries=3
3542
3643
strategy:
3744
fail-fast: false
3845
matrix:
3946
ruby:
40-
- '3.2'
41-
- '3.1'
42-
- '3.0'
43-
- '2.7'
47+
- '3.4'
4448
rails:
45-
- activerecord_7.0
46-
- activerecord_6.1
47-
- activerecord_6.0
48-
adapter:
49-
- 'sqlite3:///:memory:'
50-
- mysql2://root:root@0/closure_tree_test
51-
- postgres://closure_tree:closure_tree@0/closure_tree_test
49+
- '8.0'
5250

5351
steps:
5452
- name: Checkout
55-
uses: actions/checkout@v3
53+
uses: actions/checkout@v4
5654

5755
- name: Setup Ruby
5856
uses: ruby/setup-ruby@v1
@@ -61,13 +59,25 @@ jobs:
6159
bundler-cache: true
6260
rubygems: latest
6361
env:
64-
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
62+
RAILS_VERSION: ${{ matrix.rails }}
63+
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile
64+
65+
- name: Setup databases
66+
env:
6567
RAILS_ENV: test
68+
DATABASE_URL_PG: postgres://postgres:postgres@127.0.0.1:5432/closure_tree_test
69+
DATABASE_URL_MYSQL: mysql2://root:root@127.0.0.1:3306/closure_tree_test
70+
DATABASE_URL_SQLITE3: 'sqlite3::memory:'
71+
run: |
72+
cd test/dummy
73+
bundle exec rails db:setup_all
6674
67-
- name: RSpec
75+
- name: Run tests
6876
env:
69-
RAILS_VERSION: ${{ matrix.rails }}
70-
DB_ADAPTER: ${{ matrix.adapter }}
71-
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
77+
RAILS_ENV: test
78+
DATABASE_URL_PG: postgres://postgres:postgres@127.0.0.1:5432/closure_tree_test
79+
DATABASE_URL_MYSQL: mysql2://root:root@127.0.0.1:3306/closure_tree_test
80+
DATABASE_URL_SQLITE3: 'sqlite3::memory:'
7281
WITH_ADVISORY_LOCK_PREFIX: ${{ github.run_id }}
73-
run: bin/rake
82+
run: |
83+
bundle exec rake test

.github/workflows/ci_jruby.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/ci_truffleruby.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
issues: write
13+
14+
jobs:
15+
release-please:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: googleapis/release-please-action@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pkg/
55
rdoc/
66
doc/
77
*.sqlite3.db
8+
*.sqlite3
89
*.log
910
tmp/
1011
.DS_Store
@@ -13,4 +14,5 @@ tmp/
1314
*.lock
1415
.ruby-*
1516
*.iml
17+
.env
1618
coverage/

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{".":"9.1.1"}

.rspec

Lines changed: 0 additions & 1 deletion
This file was deleted.

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.0.5
1+
ruby 3.4.4

Appraisals

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)