Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/close-stale-issues.yml

This file was deleted.

21 changes: 7 additions & 14 deletions .github/workflows/gem-publish.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
name: Publish to RubyGems

on:
push:
branches: [ 'main' ]
paths:
- 'lib/apartment/version.rb'
pull_request:
branches: [ 'main' ]
types: [ 'closed' ]
paths:
- 'lib/apartment/version.rb'

jobs:
build:
if: github.event.pull_request.merged == true
release:
name: Build + Publish
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
contents: write
id-token: write # Required for trusted publishing to RubyGems.org
contents: write # Required for rake release to push the release tag

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
rubygems: latest
bundler: latest
ruby-version: .ruby-version
- name: Publish to RubyGems
uses: rubygems/release-gem@v1
6 changes: 5 additions & 1 deletion .github/workflows/rspec_mysql_8_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- 3.4
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
Expand All @@ -37,6 +37,10 @@ jobs:
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_mysql.gemfile
CI: true
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/rspec_pg_14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- 3.4
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
Expand All @@ -37,6 +37,11 @@ jobs:
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
- ruby_version: 3.1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
CI: true
Expand Down Expand Up @@ -102,4 +107,4 @@ jobs:
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
run: exit 1
9 changes: 7 additions & 2 deletions .github/workflows/rspec_pg_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- 3.4
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
Expand All @@ -37,6 +37,11 @@ jobs:
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
- ruby_version: 3.1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
CI: true
Expand Down Expand Up @@ -102,4 +107,4 @@ jobs:
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
run: exit 1
10 changes: 8 additions & 2 deletions .github/workflows/rspec_pg_16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ jobs:
- 3.4
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
Expand All @@ -36,6 +37,11 @@ jobs:
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
- ruby_version: 3.1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
CI: true
Expand Down Expand Up @@ -101,4 +107,4 @@ jobs:
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
run: exit 1
9 changes: 7 additions & 2 deletions .github/workflows/rspec_pg_17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- 3.4
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
Expand All @@ -37,6 +37,11 @@ jobs:
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
- ruby_version: 3.1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
CI: true
Expand Down Expand Up @@ -102,4 +107,4 @@ jobs:
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
run: exit 1
110 changes: 110 additions & 0 deletions .github/workflows/rspec_pg_18.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: RSpec PostgreSQL 18
on:
push:
branches:
- development
- main
pull_request:
types: [opened, synchronize, reopened]
release:
types: [published]

jobs:
test:
name: ${{ github.workflow }}, Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version:
- 3.1
- 3.2
- 3.3
- 3.4
- jruby
rails_version:
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: jruby
rails_version: 7_1
- ruby_version: jruby
rails_version: 7_2
- ruby_version: jruby
rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_0
- ruby_version: jruby
rails_version: 8_1
- ruby_version: 3.1
rails_version: 8_1
- ruby_version: 3.1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
CI: true
DATABASE_ENGINE: postgresql
RUBY_VERSION: ${{ matrix.ruby_version }}
RAILS_VERSION: ${{ matrix.rails_version }}
services:
postgres:
image: postgres:18-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: apartment_postgresql_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Install PostgreSQL client
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends postgresql-common
echo | sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends postgresql-client-18
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Configure config database.yml
run: bundle exec rake db:load_credentials
- name: Database Setup
run: bundle exec rake db:test:prepare
- name: Run tests
id: rspec-tests
timeout-minutes: 20
continue-on-error: true
run: |
mkdir -p ./coverage
bundle exec rspec --format progress \
--format RspecJunitFormatter -o ./coverage/test-results.xml \
--profile
- name: Codecov Upload
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
disable_search: true
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
file: ./coverage/coverage.json
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
disable_search: true
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
12 changes: 4 additions & 8 deletions .github/workflows/rspec_sqlite_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@ jobs:
- 3.4
# - jruby # We don't support jruby for sqlite yet
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
- 8_0
- 8_1
exclude:
- ruby_version: 3.1
rails_version: 8_0
# - ruby_version: jruby
# rails_version: 7_1
# - ruby_version: jruby
# rails_version: 7_2
# - ruby_version: jruby
# rails_version: 8_0
- ruby_version: 3.1
rails_version: 8_1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_sqlite3.gemfile
CI: true
Expand Down Expand Up @@ -81,4 +77,4 @@ jobs:
file: ./coverage/test-results.xml
- name: Notify of test failure
if: steps.rspec-tests.outcome == 'failure'
run: exit 1
run: exit 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ cookbooks
tmp
spec/dummy/db/*.sqlite3
.DS_Store
.claude/
Loading