Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
1,963 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sqlite: &sqlite | ||
adapter: sqlite3 | ||
database: db/test.sqlite3 | ||
|
||
mysql: &mysql | ||
adapter: mysql2 | ||
url: MYSQL | ||
|
||
postgresql: &postgresql | ||
adapter: postgresql | ||
url: POSTGRES | ||
min_messages: ERROR | ||
|
||
defaults: &defaults | ||
pool: 5 | ||
timeout: 5000 | ||
<<: *<%= ENV['DB'] || "sqlite" %> | ||
|
||
test: | ||
<<: *defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
open-pull-requests-limit: 10 | ||
ignore: | ||
- dependency-name: capistrano3-puma | ||
versions: | ||
- 5.0.2 | ||
- dependency-name: rails-controller-testing | ||
versions: | ||
- 1.0.5 | ||
- dependency-name: factory_bot_rails | ||
versions: | ||
- 6.1.0 | ||
- dependency-name: bootsnap | ||
versions: | ||
- 1.5.1 | ||
- 1.6.0 | ||
- 1.7.1 | ||
- dependency-name: repost | ||
versions: | ||
- 0.3.6 | ||
- dependency-name: capistrano | ||
versions: | ||
- 3.15.0 | ||
- dependency-name: haml | ||
versions: | ||
- 5.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: frab | ||
|
||
on: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
RAILS_ENV: test | ||
|
||
strategy: | ||
matrix: | ||
ruby_version: | ||
- 2.6 | ||
- 2.7 | ||
db: | ||
- mysql | ||
- postgresql | ||
- sqlite | ||
|
||
services: | ||
postgres: | ||
image: postgres:11 | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: root | ||
|
||
mysql: | ||
image: mariadb:10.3 | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
env: | ||
MYSQL_ROOT_PASSWORD: root | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{matrix.ruby_version}} | ||
bundler-cache: true | ||
|
||
- name: Prepare Postgresql | ||
run: | | ||
bundle exec rails db:create | ||
sed 's#url: POSTGRES#url: '$DATABASE_URL'#' .github/database.yml > config/database.yml | ||
env: | ||
DATABASE_URL: postgres://postgres:root@127.0.0.1:${{ job.services.postgres.ports[5432] }}/frab_test | ||
if: matrix.db == 'postgresql' | ||
|
||
- name: Prepare MySQL | ||
run: | | ||
bundle exec rails db:create | ||
echo $DATABASE_URL | ||
sed 's#url: MYSQL#url: '$DATABASE_URL'#' .github/database.yml > config/database.yml | ||
env: | ||
DATABASE_URL: mysql2://root:root@127.0.0.1:${{ job.services.mysql.ports[3306] }}/frab_test | ||
if: matrix.db == 'mysql' | ||
|
||
- name: Prepare SQLite | ||
run: | | ||
cp .github/database.yml config/database.yml | ||
bundle exec rails db:create | ||
if: matrix.db == 'sqlite' | ||
|
||
- name: Run tests | ||
run: | | ||
sed -i 's/config.eager_load = .*/config.eager_load = true/' config/environments/test.rb | ||
bundle exec rails db:schema:load --trace | ||
mv db/schema.rb db/schema.rb.original | ||
bundle exec rails db:rollback STEP=9 | ||
bundle exec rails db:migrate | ||
sh -c "[ '$DB' != 'sqlite' ] || diff db/schema.rb db/schema.rb.original " | ||
bundle exec rails db:test:prepare | ||
bundle exec rails test | ||
env: | ||
DB: ${{ matrix.db }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.