Skip to content

Commit

Permalink
Merge branch 'development' into create_tenant_with_default_tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
mnovelo authored Oct 29, 2024
2 parents 0b21a8a + 4a58bb3 commit 1d90830
Show file tree
Hide file tree
Showing 69 changed files with 1,629 additions and 821 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Close Stale Issues

on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
workflow_dispatch:

permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write

jobs:
close-stale-issues:
name: Close Stale Issues
runs-on: ubuntu-latest
steps:
- name: Close stale issues and pull requests
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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.'
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.'
days-before-stale: 30
days-before-close: 7
stale-issue-label: 'stale'
exempt-issue-labels: 'pinned,security'
stale-pr-label: 'stale'
exempt-pr-labels: 'work-in-progress'
delete-branch: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: RSpec
name: RSpec MySQL 8.0
on:
push:
branches:
Expand All @@ -11,7 +11,7 @@ on:

jobs:
test:
name: rails / rspec
name: ${{ github.workflow }}, Ruby ${{ matrix.ruby_version }}, Rails ${{ matrix.rails_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -33,22 +33,12 @@ jobs:
- ruby_version: jruby
rails_version: 7_2
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}.gemfile
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails_version }}${{ matrix.ruby_version == 'jruby' && '_jdbc' || '' }}_mysql.gemfile
CI: true
DATABASE_ENGINE: mysql
RUBY_VERSION: ${{ matrix.ruby_version }}
RAILS_VERSION: ${{ matrix.rails_version }}
services:
postgres:
image: postgres:14 # pg_dump tests currently depend on this version
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
mysql:
image: mysql:8.0
env:
Expand All @@ -69,8 +59,34 @@ jobs:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Configure config database.yml
run: bundle exec rake db:copy_credentials
run: bundle exec rake db:load_credentials
- name: Database Setup
run: bundle exec rake db:test:prepare
- name: Run tests
run: bundle exec rspec --format progress --format RspecJunitFormatter -o ~/test-results/rspec/rspec.xml
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
100 changes: 100 additions & 0 deletions .github/workflows/rspec_pg_14.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: RSpec PostgreSQL 14
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
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
# - master # versions failing
exclude:
- ruby_version: jruby
rails_version: 7_1
- ruby_version: jruby
rails_version: 7_2
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:14-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-14
- 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
100 changes: 100 additions & 0 deletions .github/workflows/rspec_pg_15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: RSpec PostgreSQL 15
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
- jruby
rails_version:
- 6_1
- 7_0
- 7_1
- 7_2
# - master # versions failing
exclude:
- ruby_version: jruby
rails_version: 7_1
- ruby_version: jruby
rails_version: 7_2
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:15-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-15
- 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
Loading

0 comments on commit 1d90830

Please sign in to comment.