Skip to content

Commit 2fb25d4

Browse files
authored
Merge pull request #310 from rails-on-services/development
v3.2.0
2 parents 9c0fe72 + 9d95388 commit 2fb25d4

File tree

77 files changed

+1775
-916
lines changed

Some content is hidden

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

77 files changed

+1775
-916
lines changed
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Close Stale Issues
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Runs daily at midnight
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write # only for delete-branch option
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
close-stale-issues:
15+
name: Close Stale Issues
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Close stale issues and pull requests
19+
uses: actions/stale@v9
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.'
23+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.'
24+
days-before-stale: 30
25+
days-before-close: 7
26+
stale-issue-label: 'stale'
27+
exempt-issue-labels: 'pinned,security'
28+
stale-pr-label: 'stale'
29+
exempt-pr-labels: 'work-in-progress'
30+
delete-branch: true

.github/workflows/main.yml

-74
This file was deleted.

.github/workflows/rspec_mysql_8_0.yml

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: RSpec MySQL 8.0
2+
on:
3+
push:
4+
branches:
5+
- development
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
test:
14+
name: ${{ github.workflow }}, Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_version }}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby_version:
20+
- 3.1
21+
- 3.2
22+
- 3.3
23+
- 3.4
24+
- jruby
25+
rails_version:
26+
- 6_1
27+
- 7_0
28+
- 7_1
29+
- 7_2
30+
- 8_0
31+
exclude:
32+
- ruby_version: jruby
33+
rails_version: 7_1
34+
- ruby_version: jruby
35+
rails_version: 7_2
36+
- ruby_version: jruby
37+
rails_version: 8_0
38+
- ruby_version: 3.1
39+
rails_version: 8_0
40+
env:
41+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_mysql.gemfile
42+
CI: true
43+
DATABASE_ENGINE: mysql
44+
RUBY_VERSION: ${{ matrix.ruby_version }}
45+
RAILS_VERSION: ${{ matrix.rails_version }}
46+
services:
47+
mysql:
48+
image: mysql:8.0
49+
env:
50+
MYSQL_ALLOW_EMPTY_PASSWORD: true
51+
MYSQL_DATABASE: apartment_mysql_test
52+
options: >-
53+
--health-cmd "mysqladmin ping"
54+
--health-interval 10s
55+
--health-timeout 5s
56+
--health-retries 5
57+
ports:
58+
- 3306:3306
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Set up Ruby ${{ matrix.ruby-version }}
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: ${{ matrix.ruby_version }}
65+
bundler-cache: true
66+
- name: Configure config database.yml
67+
run: bundle exec rake db:load_credentials
68+
- name: Database Setup
69+
run: bundle exec rake db:test:prepare
70+
- name: Run tests
71+
id: rspec-tests
72+
timeout-minutes: 20
73+
continue-on-error: true
74+
run: |
75+
mkdir -p ./coverage
76+
bundle exec rspec --format progress \
77+
--format RspecJunitFormatter -o ./coverage/test-results.xml \
78+
--profile
79+
- name: Codecov Upload
80+
uses: codecov/codecov-action@v4
81+
with:
82+
token: ${{ secrets.CODECOV_TOKEN }}
83+
verbose: true
84+
disable_search: true
85+
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
86+
file: ./coverage/coverage.json
87+
- name: Upload test results to Codecov
88+
uses: codecov/test-results-action@v1
89+
with:
90+
token: ${{ secrets.CODECOV_TOKEN }}
91+
verbose: true
92+
disable_search: true
93+
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
94+
file: ./coverage/test-results.xml
95+
- name: Notify of test failure
96+
if: steps.rspec-tests.outcome == 'failure'
97+
run: exit 1

.github/workflows/rspec_pg_14.yml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: RSpec PostgreSQL 14
2+
on:
3+
push:
4+
branches:
5+
- development
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
test:
14+
name: ${{ github.workflow }}, Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_version }}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby_version:
20+
- 3.1
21+
- 3.2
22+
- 3.3
23+
- 3.4
24+
- jruby
25+
rails_version:
26+
- 6_1
27+
- 7_0
28+
- 7_1
29+
- 7_2
30+
- 8_0
31+
exclude:
32+
- ruby_version: jruby
33+
rails_version: 7_1
34+
- ruby_version: jruby
35+
rails_version: 7_2
36+
- ruby_version: jruby
37+
rails_version: 8_0
38+
- ruby_version: 3.1
39+
rails_version: 8_0
40+
env:
41+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_postgresql.gemfile
42+
CI: true
43+
DATABASE_ENGINE: postgresql
44+
RUBY_VERSION: ${{ matrix.ruby_version }}
45+
RAILS_VERSION: ${{ matrix.rails_version }}
46+
services:
47+
postgres:
48+
image: postgres:14-alpine
49+
env:
50+
POSTGRES_PASSWORD: postgres
51+
POSTGRES_HOST_AUTH_METHOD: trust
52+
POSTGRES_DB: apartment_postgresql_test
53+
options: >-
54+
--health-cmd pg_isready
55+
--health-interval 10s
56+
--health-timeout 5s
57+
--health-retries 5
58+
ports:
59+
- 5432:5432
60+
steps:
61+
- name: Install PostgreSQL client
62+
run: |
63+
sudo apt-get update -qq
64+
sudo apt-get install -y --no-install-recommends postgresql-common
65+
echo | sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
66+
sudo apt-get update -qq
67+
sudo apt-get install -y --no-install-recommends postgresql-client-14
68+
- uses: actions/checkout@v4
69+
- name: Set up Ruby ${{ matrix.ruby-version }}
70+
uses: ruby/setup-ruby@v1
71+
with:
72+
ruby-version: ${{ matrix.ruby_version }}
73+
bundler-cache: true
74+
- name: Configure config database.yml
75+
run: bundle exec rake db:load_credentials
76+
- name: Database Setup
77+
run: bundle exec rake db:test:prepare
78+
- name: Run tests
79+
id: rspec-tests
80+
timeout-minutes: 20
81+
continue-on-error: true
82+
run: |
83+
mkdir -p ./coverage
84+
bundle exec rspec --format progress \
85+
--format RspecJunitFormatter -o ./coverage/test-results.xml \
86+
--profile
87+
- name: Codecov Upload
88+
uses: codecov/codecov-action@v4
89+
with:
90+
token: ${{ secrets.CODECOV_TOKEN }}
91+
verbose: true
92+
disable_search: true
93+
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
94+
file: ./coverage/coverage.json
95+
- name: Upload test results to Codecov
96+
uses: codecov/test-results-action@v1
97+
with:
98+
token: ${{ secrets.CODECOV_TOKEN }}
99+
verbose: true
100+
disable_search: true
101+
env_vars: DATABASE_ENGINE, RUBY_VERSION, RAILS_VERSION
102+
file: ./coverage/test-results.xml
103+
- name: Notify of test failure
104+
if: steps.rspec-tests.outcome == 'failure'
105+
run: exit 1

0 commit comments

Comments
 (0)