Skip to content

Commit a340406

Browse files
committed
👷 GH Actions
1 parent 75fb41b commit a340406

26 files changed

+1065
-27
lines changed

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
buy_me_a_coffee: pboling
4+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
5+
github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
6+
issuehunt: pboling # Replace with a single IssueHunt username
7+
ko_fi: pboling # Replace with a single Ko-fi username
8+
liberapay: pboling # Replace with a single Liberapay username
9+
open_collective: # Replace with a single Open Collective username
10+
patreon: galtzo # Replace with a single Patreon username
11+
polar: pboling
12+
thanks_dev: u/gh/pboling
13+
tidelift: rubygems/masq2 # Replace with a single Tidelift platform-name/package-name e.g., npm/babel

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: "rubocop-lts"
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main, "*-stable" ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main, "*-stable" ]
20+
schedule:
21+
- cron: '35 1 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'ruby' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v3
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v3
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v3

.github/workflows/coverage.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Test Coverage
2+
3+
env:
4+
K_SOUP_COV_MIN_BRANCH: 79
5+
K_SOUP_COV_MIN_LINE: 98
6+
K_SOUP_COV_MIN_HARD: true
7+
K_SOUP_COV_DO: true
8+
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
9+
10+
on:
11+
push:
12+
branches:
13+
- 'main'
14+
tags:
15+
- '!*' # Do not execute on tags
16+
pull_request:
17+
branches:
18+
- '*'
19+
# Allow manually triggering the workflow.
20+
workflow_dispatch:
21+
22+
permissions:
23+
contents: read
24+
25+
# Cancels all previous workflow runs for the same branch that have not yet completed.
26+
concurrency:
27+
# The concurrency group contains the workflow name and the branch name.
28+
group: "${{ github.workflow }}-${{ github.ref }}"
29+
cancel-in-progress: true
30+
31+
jobs:
32+
coverage:
33+
name: Code Coverage on ${{ matrix.ruby }}@current
34+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
35+
runs-on: ubuntu-latest
36+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
37+
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
38+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
include:
43+
# Coverage
44+
- ruby: "ruby"
45+
appraisal: "coverage"
46+
exec_cmd: "rake test"
47+
gemfile: "Appraisal.root"
48+
rubygems: latest
49+
bundler: latest
50+
51+
steps:
52+
- uses: amancevice/setup-code-climate@v2
53+
name: CodeClimate Install
54+
if: ${{ github.event_name != 'pull_request' }}
55+
with:
56+
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
57+
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Ruby & RubyGems
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: "${{ matrix.ruby }}"
65+
rubygems: "${{ matrix.rubygems }}"
66+
bundler: "${{ matrix.bundler }}"
67+
bundler-cache: false
68+
69+
- name: CodeClimate Pre-build Notification
70+
run: cc-test-reporter before-build
71+
if: ${{ github.event_name != 'pull_request' }}
72+
continue-on-error: ${{ matrix.experimental != 'false' }}
73+
74+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
75+
# We need to do this first to get appraisal installed.
76+
# NOTE: This does not use the main Gemfile at all.
77+
- name: Install Root Appraisal
78+
run: bundle
79+
- name: Appraisal for ${{ matrix.appraisal }}
80+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
81+
- name: Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }}
82+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
83+
84+
- name: CodeClimate Post-build Notification
85+
run: cc-test-reporter after-build
86+
if: ${{ github.event_name != 'pull_request' }}
87+
continue-on-error: ${{ matrix.experimental != 'false' }}
88+
89+
- name: Code Coverage Summary Report
90+
uses: irongut/[email protected]
91+
if: ${{ github.event_name == 'pull_request' }}
92+
with:
93+
filename: ./coverage/coverage.xml
94+
badge: true
95+
fail_below_min: true
96+
format: markdown
97+
hide_branch_rate: false
98+
hide_complexity: true
99+
indicators: true
100+
output: both
101+
thresholds: '69 80'
102+
continue-on-error: ${{ matrix.experimental != 'false' }}
103+
104+
- name: Add Coverage PR Comment
105+
uses: marocchino/sticky-pull-request-comment@v2
106+
if: ${{ github.event_name == 'pull_request' }}
107+
with:
108+
recreate: true
109+
path: code-coverage-results.md
110+
continue-on-error: ${{ matrix.experimental != 'false' }}
111+
112+
- name: Coveralls
113+
uses: coverallsapp/github-action@master
114+
with:
115+
github-token: ${{ secrets.GITHUB_TOKEN }}
116+
continue-on-error: ${{ matrix.experimental != 'false' }}
117+
118+
- name: Upload results to Codecov
119+
uses: codecov/codecov-action@v5
120+
with:
121+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/current.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Targets the evergreen latest release of ruby, truffleruby, and jruby
2+
name: Current
3+
4+
env:
5+
K_SOUP_COV_DO: false
6+
7+
on:
8+
push:
9+
branches:
10+
- 'main'
11+
tags:
12+
- '!*' # Do not execute on tags
13+
pull_request:
14+
branches:
15+
- '*'
16+
# Allow manually triggering the workflow.
17+
workflow_dispatch:
18+
19+
permissions:
20+
contents: read
21+
22+
# Cancels all previous workflow runs for the same branch that have not yet completed.
23+
concurrency:
24+
# The concurrency group contains the workflow name and the branch name.
25+
group: "${{ github.workflow }}-${{ github.ref }}"
26+
cancel-in-progress: true
27+
28+
jobs:
29+
test:
30+
name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
31+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
32+
runs-on: ubuntu-latest
33+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
34+
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
35+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
36+
strategy:
37+
matrix:
38+
include:
39+
# Ruby 3.4, Rails 7.2
40+
- ruby: "ruby"
41+
appraisal: "rails-7-2"
42+
exec_cmd: "rake test"
43+
gemfile: "Appraisal.root"
44+
rubygems: latest
45+
bundler: latest
46+
47+
# Ruby 3.4, Rails 8.0
48+
- ruby: "ruby"
49+
appraisal: "rails-8-0"
50+
exec_cmd: "rake test"
51+
gemfile: "Appraisal.root"
52+
rubygems: latest
53+
bundler: latest
54+
55+
# truffleruby-24.1, Rails 8.0
56+
# (according to documentation: targets Ruby 3.3 compatibility)
57+
# (according to runtime: targets Ruby 3.2 compatibility)
58+
- ruby: "truffleruby"
59+
appraisal: "rails-8-0"
60+
exec_cmd: "rake test"
61+
gemfile: "Appraisal.root"
62+
rubygems: default
63+
bundler: default
64+
65+
# jruby-9.4, Rails 7.2
66+
# (targets Ruby 3.1 compatibility)
67+
- ruby: "jruby"
68+
appraisal: "rails-7-2"
69+
exec_cmd: "rake test"
70+
gemfile: "Appraisal.root"
71+
rubygems: default
72+
bundler: default
73+
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
78+
- name: Setup Ruby & RubyGems
79+
uses: ruby/setup-ruby@v1
80+
with:
81+
ruby-version: ${{ matrix.ruby }}
82+
rubygems: ${{ matrix.rubygems }}
83+
bundler: ${{ matrix.bundler }}
84+
bundler-cache: false
85+
86+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
87+
# We need to do this first to get appraisal installed.
88+
# NOTE: This does not use the main Gemfile at all.
89+
- name: Install Root Appraisal
90+
run: bundle
91+
- name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}
92+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
93+
- name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
94+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@v4
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@v4

0 commit comments

Comments
 (0)