Skip to content

Updates #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4af9679
🙈 Stop git-ignoring Gemfile.lock
pboling Nov 12, 2024
2831eaf
🧑‍💻 Develop with Ruby 3.3.5
pboling Nov 12, 2024
1764ca4
🐛 Don't incur dependency on ActiveModel when using Sequel ORM
pboling Nov 12, 2024
559115e
📝 Improve documentation of has_secure_password
pboling Nov 12, 2024
5117d05
📝 Improve documentation of locate for Sequel
pboling Nov 12, 2024
8e20010
🔒️ Cert for Gem Signing (Security)
pboling Nov 12, 2024
84090a4
🎨 Use gemfiles/*.gemfile pattern
pboling Nov 12, 2024
45c471d
🚨 Use gemfiles/*.gemfile pattern
pboling Nov 12, 2024
849bfd0
🗑️ Deprecate require 'omniauth/identity'
pboling Nov 12, 2024
99bba1f
👷 Update Github actions
pboling Nov 12, 2024
3d32d0b
📝 Update link to omniauth org
pboling Nov 13, 2024
b015ac4
👷 Appraisal: Setup service deps
pboling Nov 14, 2024
a4a5ce2
👷 Appraisal: ActiveRecord 5 is the minimum supported version
pboling Nov 14, 2024
4e3368d
👷 Appraisal: Loosen sqlite3 version restriction
pboling Nov 14, 2024
dd0ef51
👷 Appraisal: Coverage runs on Ruby 3.3 and Rails 7.2.2
pboling Nov 14, 2024
347d92f
👷 Appraisal: Coverage runs on Ruby v3.3, Rails v7.2.2, Mongoid v9.0.3
pboling Nov 14, 2024
8ee5b9c
👷 Fix args handling
pboling Nov 14, 2024
857e883
👷 Always run services for coverage to run all specs
pboling Nov 14, 2024
c1a8d47
👷 Fix workflow syntax
pboling Nov 14, 2024
99bd0cb
👷 Stop testing on Ruby 2.4
pboling Nov 14, 2024
28d1a87
👷 CouchDB: Use default connection string for tests
pboling Nov 14, 2024
8794f2a
👷 Appraisals: Add mongoid-rspec to mongoid tests runs
pboling Nov 14, 2024
ccee650
👷 Workflows: fix matrix logic
pboling Nov 14, 2024
3f28678
👷 Workflows: fix CouchDB initialization for tests
pboling Nov 14, 2024
bd5649e
⬇️ Ignore bad release of standard
pboling Nov 14, 2024
6bc834e
🚨 Linting
pboling Nov 14, 2024
75cab65
📌 Pin sqlite3 deps for AR
pboling Nov 14, 2024
342c9dc
💚 Stop testing on JRuby
pboling Nov 14, 2024
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
37 changes: 37 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Run any command in this library's bin/ without the bin/ prefix!
PATH_add bin

# Only add things to this file that should be shared with the team.

# **dotenv** (See end of file for .env.local integration)
# .env would override anything in this file, if enabled.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
# Override and customize anything below in your own .env.local
# If you are using dotenv and not direnv,
# copy the following `export` statements to your own .env file.

### General Ruby ###
# Turn off Ruby Warnings about deprecated code
# export RUBYOPT="-W0"

### External Testing Controls
export K_SOUP_COV_DO=true # Means you want code coverage
# Available formats are html, xml, rcov, lcov, json, tty
export K_SOUP_COV_COMMAND_NAME="RSpec Coverage"
export K_SOUP_COV_FORMATTERS="html,tty"
export K_SOUP_COV_MIN_BRANCH=80 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=91 # Means you want to enforce X% line coverage
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
export K_SOUP_COV_MULTI_FORMATTERS=true
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage

# Internal Debugging Controls
export DEBUG=false # do not allow byebug statements (override in .env.local)

# .env would override anything in this file, if `dotenv` is uncommented below.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
# and that is why we generally want to leave it commented out.
# dotenv

# .env.local will override anything in this file.
dotenv_if_exists .env.local
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

buy_me_a_coffee: pboling
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
issuehunt: pboling # Replace with a single IssueHunt username
ko_fi: pboling # Replace with a single Ko-fi username
liberapay: pboling # Replace with a single Liberapay username
open_collective: # Replace with a single Open Collective username
patreon: galtzo # Replace with a single Patreon username
polar: pboling
thanks_dev: gh/pboling
tidelift: rubygems/omniauth-identity # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
11 changes: 8 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "04:28"
open-pull-requests-limit: 10
interval: "daily"
open-pull-requests-limit: 10
ignore:
- dependency-name: "rubocop-lts"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
121 changes: 121 additions & 0 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Ancient (EOL, Ruby 2.4, 2.5) Matrix

on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# Ruby 2.5
- ruby: "2.5"
appraisal: "ar-5-1"
taskname: "spec:orm:active_record"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "ar-5-2"
taskname: "spec:orm:active_record"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "ar-6-0"
taskname: "spec:orm:active_record"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "ar-6-1"
taskname: "spec:orm:active_record"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "mongoid-7.3"
taskname: "spec:orm:mongoid"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "mongoid-7.4"
taskname: "spec:orm:mongoid"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"
- ruby: "2.5"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.taskname, 'couch_potato')"
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
if: "endsWith(matrix.taskname, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session

### MONGODB
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.11.0
if: "endsWith(matrix.taskname, 'mongoid')"
with:
mongodb-version: "8.0"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main, "*-stable" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main, "*-stable" ]
schedule:
- cron: '35 1 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
125 changes: 125 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Ruby - Coverage

env:
K_SOUP_COV_MIN_BRANCH: 80
K_SOUP_COV_MIN_LINE: 91
K_SOUP_COV_MIN_HARD: true
K_SOUP_COV_DO: true
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"

on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

permissions:
contents: read

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
experimental: [false]
rubygems:
- latest
bundler:
- latest
gemfile:
- coverage
ruby:
- '3.3'

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session

### MONGODB
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.11.0
with:
mongodb-version: "8.0"

- uses: amancevice/setup-code-climate@v2
name: CodeClimate Install
if: ${{ github.event_name != 'pull_request' }}
with:
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}

- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler: "${{ matrix.bundler }}"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: CodeClimate Pre-build Notification
run: cc-test-reporter before-build
if: ${{ github.event_name != 'pull_request' }}
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Run RSpec tests
run: bundle exec rake spec:orm:all

- name: CodeClimate Post-build Notification
run: cc-test-reporter after-build
if: ${{ github.event_name != 'pull_request' }}
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.3.0
if: ${{ github.event_name == 'pull_request' }}
with:
filename: ./coverage/coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '69 80'
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event_name == 'pull_request' }}
with:
recreate: true
path: code-coverage-results.md
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: ${{ matrix.experimental != 'false' }}
Loading
Loading