kettle-dev 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.devcontainer/devcontainer.json +26 -0
  4. data/.envrc +42 -0
  5. data/.git-hooks/commit-msg +41 -0
  6. data/.git-hooks/commit-subjects-goalie.txt +8 -0
  7. data/.git-hooks/footer-template.erb.txt +16 -0
  8. data/.git-hooks/prepare-commit-msg +20 -0
  9. data/.github/FUNDING.yml +13 -0
  10. data/.github/dependabot.yml +11 -0
  11. data/.github/workflows/ancient.yml +80 -0
  12. data/.github/workflows/auto-assign.yml +21 -0
  13. data/.github/workflows/codeql-analysis.yml +70 -0
  14. data/.github/workflows/coverage.yml +130 -0
  15. data/.github/workflows/current.yml +88 -0
  16. data/.github/workflows/dependency-review.yml +20 -0
  17. data/.github/workflows/discord-notifier.yml +38 -0
  18. data/.github/workflows/heads.yml +87 -0
  19. data/.github/workflows/jruby.yml +79 -0
  20. data/.github/workflows/legacy.yml +70 -0
  21. data/.github/workflows/locked_deps.yml +88 -0
  22. data/.github/workflows/opencollective.yml +40 -0
  23. data/.github/workflows/style.yml +67 -0
  24. data/.github/workflows/supported.yml +85 -0
  25. data/.github/workflows/truffle.yml +78 -0
  26. data/.github/workflows/unlocked_deps.yml +87 -0
  27. data/.github/workflows/unsupported.yml +78 -0
  28. data/.gitignore +48 -0
  29. data/.gitlab-ci.yml +45 -0
  30. data/.junie/guidelines-rbs.md +49 -0
  31. data/.junie/guidelines.md +132 -0
  32. data/.opencollective.yml +3 -0
  33. data/.qlty/qlty.toml +79 -0
  34. data/.rspec +8 -0
  35. data/.rubocop.yml +13 -0
  36. data/.simplecov +7 -0
  37. data/.tool-versions +1 -0
  38. data/.yard_gfm_support.rb +22 -0
  39. data/.yardopts +11 -0
  40. data/Appraisal.root.gemfile +12 -0
  41. data/Appraisals +120 -0
  42. data/CHANGELOG.md +26 -5
  43. data/Gemfile +32 -0
  44. data/Rakefile +99 -0
  45. data/checksums/kettle-dev-1.0.1.gem.sha256 +1 -0
  46. data/checksums/kettle-dev-1.0.1.gem.sha512 +1 -0
  47. data/checksums/kettle-dev-1.0.2.gem.sha256 +1 -0
  48. data/checksums/kettle-dev-1.0.2.gem.sha512 +1 -0
  49. data/exe/kettle-commit-msg +185 -0
  50. data/exe/kettle-readme-backers +355 -0
  51. data/exe/kettle-release +327 -0
  52. data/gemfiles/modular/coverage.gemfile +6 -0
  53. data/gemfiles/modular/documentation.gemfile +11 -0
  54. data/gemfiles/modular/style.gemfile +16 -0
  55. data/lib/kettle/dev/rakelib/appraisal.rake +40 -0
  56. data/lib/kettle/dev/rakelib/bench.rake +58 -0
  57. data/lib/kettle/dev/rakelib/bundle_audit.rake +18 -0
  58. data/lib/kettle/dev/rakelib/ci.rake +348 -0
  59. data/lib/kettle/dev/rakelib/install.rake +304 -0
  60. data/lib/kettle/dev/rakelib/reek.rake +34 -0
  61. data/lib/kettle/dev/rakelib/require_bench.rake +7 -0
  62. data/lib/kettle/dev/rakelib/rubocop_gradual.rake +9 -0
  63. data/lib/kettle/dev/rakelib/spec_test.rake +42 -0
  64. data/lib/kettle/dev/rakelib/template.rake +413 -0
  65. data/lib/kettle/dev/rakelib/yard.rake +33 -0
  66. data/lib/kettle/dev/version.rb +1 -1
  67. data.tar.gz.sig +0 -0
  68. metadata +74 -5
  69. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d64f3a7f29e3470e85bfa3ad0ba278f7f591c618ced02911e6bdf00f804ee128
4
- data.tar.gz: 90e9d7630f0115f908efff5e5ad359ff787cb80660a44fd5b6ba63a01839fb6b
3
+ metadata.gz: ecdb3d6d039419832299b33679576735dc54bb4a0a2e3e6eadbc0025a8dc12d7
4
+ data.tar.gz: 0f83cc1bcaf33136687b4374830318a3621123c20300a6b97b7acab310ea4d34
5
5
  SHA512:
6
- metadata.gz: b9323a16c2cc9236888a268907031508b9b74b99feb5d149233604809e855bda0e34a03543d7cd683affe0e9139b993a31f7f746b226a9a9cec06987045d99b3
7
- data.tar.gz: 48f6ef3c7424930a5840f71b2f9dcf86df2e6bb1a9b341bc29dfc15941ef6576bc2fad093b34e6d210792b70b6f5f4fbe180d86eaee21e7bd7f82f0e29396b8a
6
+ metadata.gz: 516fe50f03c591f5501b056fda8cdeadca1a0f743117c04c651159f6b4b3bf53069460ed28369cba9f9964277457513fcd76051add3fdda7d8fb0f4e579723a2
7
+ data.tar.gz: 625d8c9ecc7b900aa60f6e758f1467ec7114ebb26017ae5bbae3eebe6cd259ac808b6b67acbb163998a091b2a369c55cc45dc532c6b24006bc4fcd00674f120b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,26 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm",
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+
14
+ // Use 'postCreateCommand' to run commands after the container is created.
15
+ // "postCreateCommand": "ruby --version",
16
+
17
+ // Configure tool-specific properties.
18
+ "customizations" : {
19
+ "jetbrains" : {
20
+ "backend" : "RubyMine"
21
+ }
22
+ },
23
+
24
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25
+ // "remoteUser": "root"
26
+ }
data/.envrc ADDED
@@ -0,0 +1,42 @@
1
+ # Run any command in this library's bin/ without the bin/ prefix!
2
+ PATH_add bin
3
+ PATH_add exe
4
+
5
+ # Only add things to this file that should be shared with the team.
6
+
7
+ # **dotenv** (See end of file for .env.local integration)
8
+ # .env would override anything in this file, if enabled.
9
+ # .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
10
+ # Override and customize anything below in your own .env.local
11
+ # If you are using dotenv and not direnv,
12
+ # copy the following `export` statements to your own .env file.
13
+
14
+ ### General Ruby ###
15
+ # Turn off Ruby Warnings about deprecated code
16
+ # export RUBYOPT="-W0"
17
+
18
+ ### External Testing Controls
19
+ export K_SOUP_COV_DO=true # Means you want code coverage
20
+ export K_SOUP_COV_COMMAND_NAME="Test Coverage"
21
+ # Available formats are html, xml, rcov, lcov, json, tty
22
+ export K_SOUP_COV_FORMATTERS="html,xml,rcov,lcov,json,tty"
23
+ export K_SOUP_COV_MIN_BRANCH=100 # Means you want to enforce X% branch coverage
24
+ export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage
25
+ export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
26
+ export K_SOUP_COV_MULTI_FORMATTERS=true
27
+ export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
28
+ export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
29
+ export KETTLE_TEST_SILENT=true
30
+
31
+ # Internal Debugging Controls
32
+ export DEBUG=false # do not allow byebug statements (override in .env.local)
33
+ export FLOSS_CFG_FUND_DEBUG=false # extra logging to help diagnose issues (override in .env.local)
34
+ export FLOSS_CFG_FUND_LOGFILE=tmp/log/debug.log
35
+
36
+ # .env would override anything in this file, if `dotenv` is uncommented below.
37
+ # .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
38
+ # and that is why we generally want to leave it commented out.
39
+ # dotenv
40
+
41
+ # .env.local will override anything in this file.
42
+ dotenv_if_exists .env.local
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env ruby
2
+ # vim: set syntax=ruby
3
+
4
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
5
+
6
+ require "rubygems"
7
+ require "bundler/setup"
8
+
9
+ # External gems
10
+ require "gitmoji/regex"
11
+
12
+ full_text = File.read(ARGV[0])
13
+ # Is the first character a GitMoji?
14
+ gitmoji_index = full_text =~ Gitmoji::Regex::REGEX
15
+ if gitmoji_index == 0
16
+ exit 0
17
+ else
18
+ denied = <<EOM
19
+ Oh snap, think again...
20
+
21
+ ______ _______ ___ _______ _______ _______ _______ ______ __
22
+ | _ | | | | || || || || || | | |
23
+ | | || | ___| | || ___|| ||_ _|| ___|| _ || |
24
+ | |_||_ | |___ | || |___ | | | | | |___ | | | || |
25
+ | __ || ___| ___| || ___|| _| | | | ___|| |_| ||__|
26
+ | | | || |___ | || |___ | |_ | | | |___ | | __
27
+ |___| |_||_______||_______||_______||_______| |___| |_______||______| |__|
28
+
29
+
30
+ Did you forget to add a relevant gitmoji? (see https://gitmoji.dev/ for tools)
31
+ In this project, a Gitmoji must be the first grapheme of the commit message.
32
+ What's a grapheme?
33
+ A symbol rendered to be visually identifiable as a single character, but which may be composed of multiple Unicode code points)
34
+ Must match: #{Gitmoji::Regex::REGEX.to_s}
35
+ #{gitmoji_index ? "Found a gitmoji at character index #{gitmoji_index}... not good enough.\n" : ""}
36
+ Example: git commit -m "✨ My excellent new feature"
37
+
38
+ EOM
39
+ puts denied
40
+ exit 1
41
+ end
@@ -0,0 +1,8 @@
1
+ 🔖 Prepare release v
2
+ 🔒️ Checksums for v
3
+
4
+ # Lines beginning with # are ignored.
5
+ # This file is read by .git-hooks/prepare-commit-msg in each project.
6
+ # Each line of this file will be matched against the commit subject using `starts_with?`.
7
+ # If any `starts_with?` match the project script bin/prepare-commit-msg will run.
8
+ # 🔒️ Checksums for v is the standard commit message by stone_checksums.
@@ -0,0 +1,16 @@
1
+ ⚡️ A message from a fellow meat-based-AI ⚡️
2
+ - [❤️] Finely-crafted open-source tools like <%= @gem_name %> (& many more) are a full-time endeavor.
3
+ - [❤️] Though I adore my work, it lacks financial sustainability.
4
+ - [❤️] Please, help me continue enhancing your tools by becoming a sponsor:
5
+ - [💲] https://liberapay.com/pboling/donate
6
+ - [💲] https://github.com/sponsors/pboling
7
+
8
+ <% if ENV["GIT_HOOK_FOOTER_APPEND_DEBUG"] == "true" %>
9
+ @pwd = <%= @pwd %>
10
+ @gemspecs = <%= @gemspecs %>
11
+ @spec = <%= @spec %>
12
+ @gemspec_path = <%= @gemspec_path %>
13
+ @gem_name <%= @gem_name %>
14
+ @spec_name <%= @spec_name %>
15
+ @content <%= @content %>
16
+ <% end %>
@@ -0,0 +1,20 @@
1
+ #!/bin/sh
2
+
3
+ # Fail on error and unset variables
4
+ set -eu
5
+
6
+ # Determine project root as the parent directory of this hook script
7
+ PROJECT_ROOT="$(CDPATH= cd -- "$(dirname -- "$0")"/.. && pwd)"
8
+
9
+ # Run the Ruby hook within the direnv context (if available),
10
+ # so ENV from .envrc/.env.local at project root is loaded.
11
+ # One of the things .envrc needs to do is add $PROJECT_ROOT/bin/ to the path.
12
+ # You should have this line at the top of .envrc
13
+ # PATH_add bin
14
+ # NOTE: this project needs to also add exe as well,
15
+ # but other libraries won't generally need to do that.
16
+ if command -v direnv >/dev/null 2>&1; then
17
+ exec direnv exec "$PROJECT_ROOT" "kettle-commit-msg" "$@"
18
+ else
19
+ raise "direnv not found. Local development of this project ($PROJECT_ROOT) with tools from the kettle-dev gem may not work properly. Please run 'brew install direnv'."
20
+ fi
@@ -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: kettle-rb
10
+ patreon: galtzo # Replace with a single Patreon username
11
+ polar: pboling
12
+ thanks_dev: u/gh/pboling
13
+ tidelift: rubygems/kettle-dev
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,80 @@
1
+ name: MRI 2.3, 2.4, 2.5 (EOL)
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - 'main'
7
+ tags:
8
+ - '!*' # Do not execute on tags
9
+ pull_request:
10
+ # types specification prevents double build on push & pull request
11
+ # See: https://github.com/Shopify/ruby-style-guide/pull/235#issuecomment-777623642
12
+ types: [opened, synchronize]
13
+ branches:
14
+ - '*'
15
+ # Allow manually triggering the workflow.
16
+ workflow_dispatch:
17
+
18
+ # Cancels all previous workflow runs for the same branch that have not yet completed.
19
+ concurrency:
20
+ # The concurrency group contains the workflow name and the branch name.
21
+ group: "${{ github.workflow }}-${{ github.ref }}"
22
+ cancel-in-progress: true
23
+
24
+ jobs:
25
+ test:
26
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.owner.login != 'kettle-rb') && !contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')
27
+ name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
28
+ runs-on: ubuntu-22.04
29
+ continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
30
+ env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
31
+ BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ include:
36
+ # Ruby 2.3
37
+ - ruby: "ruby-2.3"
38
+ appraisal: "ruby-2-3"
39
+ exec_cmd: "rake test"
40
+ gemfile: "Appraisal.root"
41
+ rubygems: "3.3.27"
42
+ bundler: "2.3.27"
43
+
44
+ # Ruby 2.4
45
+ - ruby: "ruby-2.4"
46
+ appraisal: "ruby-2-4"
47
+ exec_cmd: "rake test"
48
+ gemfile: "Appraisal.root"
49
+ rubygems: "3.3.27"
50
+ bundler: "2.3.27"
51
+
52
+ # Ruby 2.5
53
+ - ruby: "ruby-2.5"
54
+ appraisal: "ruby-2-5"
55
+ exec_cmd: "rake test"
56
+ gemfile: "Appraisal.root"
57
+ rubygems: "3.3.27"
58
+ bundler: "2.3.27"
59
+
60
+ steps:
61
+ - name: Checkout
62
+ uses: actions/checkout@v5
63
+
64
+ - name: Setup Ruby & RubyGems
65
+ uses: ruby/setup-ruby@v1
66
+ with:
67
+ ruby-version: ${{ matrix.ruby }}
68
+ rubygems: ${{ matrix.rubygems }}
69
+ bundler: ${{ matrix.bundler }}
70
+ bundler-cache: false
71
+
72
+ # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
73
+ # We need to do this first to get appraisal installed.
74
+ # NOTE: This does not use the main Gemfile at all.
75
+ - name: Install Root Appraisal
76
+ run: bundle
77
+ - name: Appraisal for ${{ matrix.appraisal }}
78
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle
79
+ - name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
80
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
@@ -0,0 +1,21 @@
1
+ name: Auto Assign
2
+ on:
3
+ issues:
4
+ types: [opened]
5
+ pull_request:
6
+ types: [opened]
7
+ jobs:
8
+ run:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ issues: write
12
+ pull-requests: write
13
+ steps:
14
+ - name: 'Auto-assign issue'
15
+ uses: pozil/auto-assign-issue@v2
16
+ with:
17
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
18
+ assignees: pboling
19
+ abortIfPreviousAssignees: true
20
+ allowSelfAssign: true
21
+ numOfAssignee: 1
@@ -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@v5
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
@@ -0,0 +1,130 @@
1
+ name: Test Coverage
2
+
3
+ permissions:
4
+ contents: read
5
+ pull-requests: write
6
+ id-token: write
7
+
8
+ env:
9
+ # Lower than local, which is at 100/100, because rubocop-lts isn't installed in the coverage workflow
10
+ K_SOUP_COV_MIN_BRANCH: 90
11
+ K_SOUP_COV_MIN_LINE: 95
12
+ K_SOUP_COV_MIN_HARD: true
13
+ K_SOUP_COV_FORMATTERS: "xml,rcov,lcov,tty"
14
+ K_SOUP_COV_DO: true
15
+ K_SOUP_COV_MULTI_FORMATTERS: true
16
+ K_SOUP_COV_COMMAND_NAME: "Test Coverage"
17
+
18
+ on:
19
+ push:
20
+ branches:
21
+ - 'main'
22
+ tags:
23
+ - '!*' # Do not execute on tags
24
+ pull_request:
25
+ # types specification prevents double build on push & pull request
26
+ # See: https://github.com/Shopify/ruby-style-guide/pull/235#issuecomment-777623642
27
+ types: [opened, synchronize]
28
+ branches:
29
+ - '*'
30
+ # Allow manually triggering the workflow.
31
+ workflow_dispatch:
32
+
33
+ # Cancels all previous workflow runs for the same branch that have not yet completed.
34
+ concurrency:
35
+ # The concurrency group contains the workflow name and the branch name.
36
+ group: "${{ github.workflow }}-${{ github.ref }}"
37
+ cancel-in-progress: true
38
+
39
+ jobs:
40
+ coverage:
41
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.owner.login != 'kettle-rb') && !contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')
42
+ name: Code Coverage on ${{ matrix.ruby }}@current
43
+ runs-on: ubuntu-latest
44
+ continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
45
+ env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
46
+ BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
47
+ strategy:
48
+ fail-fast: false
49
+ matrix:
50
+ include:
51
+ # Coverage
52
+ - ruby: "ruby"
53
+ appraisal: "coverage"
54
+ exec_cmd: "rake test"
55
+ gemfile: "Appraisal.root"
56
+ rubygems: latest
57
+ bundler: latest
58
+
59
+ steps:
60
+ - name: Checkout
61
+ uses: actions/checkout@v5
62
+
63
+ - name: Setup Ruby & RubyGems
64
+ uses: ruby/setup-ruby@v1
65
+ with:
66
+ ruby-version: "${{ matrix.ruby }}"
67
+ rubygems: "${{ matrix.rubygems }}"
68
+ bundler: "${{ matrix.bundler }}"
69
+ bundler-cache: false
70
+
71
+ # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
72
+ # We need to do this first to get appraisal installed.
73
+ # NOTE: This does not use the main Gemfile at all.
74
+ - name: Install Root Appraisal
75
+ run: bundle
76
+ - name: Appraisal for ${{ matrix.appraisal }}
77
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle
78
+ - name: Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }}
79
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
80
+
81
+ # Do SaaS coverage uploads first
82
+ - name: Upload coverage to Coveralls
83
+ if: ${{ !env.ACT }}
84
+ uses: coverallsapp/github-action@master
85
+ with:
86
+ github-token: ${{ secrets.GITHUB_TOKEN }}
87
+ continue-on-error: ${{ matrix.experimental != 'false' }}
88
+
89
+ - name: Upload coverage to QLTY
90
+ if: ${{ !env.ACT }}
91
+ uses: qltysh/qlty-action/coverage@main
92
+ with:
93
+ token: ${{secrets.QLTY_COVERAGE_TOKEN}}
94
+ files: coverage/.resultset.json
95
+ continue-on-error: ${{ matrix.experimental != 'false' }}
96
+
97
+ # Build will fail here if coverage upload fails
98
+ # which will hopefully be noticed for the lack of code coverage comments
99
+ - name: Upload coverage to CodeCov
100
+ if: ${{ !env.ACT }}
101
+ uses: codecov/codecov-action@v5
102
+ with:
103
+ use_oidc: true
104
+ fail_ci_if_error: false # optional (default = false)
105
+ files: coverage/lcov.info,coverage/coverage.xml
106
+ verbose: true # optional (default = false)
107
+
108
+ # Then PR comments
109
+ - name: Code Coverage Summary Report
110
+ if: ${{ !env.ACT && github.event_name == 'pull_request' }}
111
+ uses: irongut/CodeCoverageSummary@v1.3.0
112
+ with:
113
+ filename: ./coverage/coverage.xml
114
+ badge: true
115
+ fail_below_min: true
116
+ format: markdown
117
+ hide_branch_rate: false
118
+ hide_complexity: true
119
+ indicators: true
120
+ output: both
121
+ thresholds: '95 90'
122
+ continue-on-error: ${{ matrix.experimental != 'false' }}
123
+
124
+ - name: Add Coverage PR Comment
125
+ uses: marocchino/sticky-pull-request-comment@v2
126
+ if: ${{ !env.ACT && github.event_name == 'pull_request' }}
127
+ with:
128
+ recreate: true
129
+ path: code-coverage-results.md
130
+ continue-on-error: ${{ matrix.experimental != 'false' }}
@@ -0,0 +1,88 @@
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
+ # types specification prevents double build on push & pull request
15
+ # See: https://github.com/Shopify/ruby-style-guide/pull/235#issuecomment-777623642
16
+ types: [opened, synchronize]
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
+ test:
33
+ if: (github.event_name == 'push' || github.event.pull_request.head.repo.owner.login != 'kettle-rb') && !contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')
34
+ name: Specs ${{ matrix.ruby }}@${{ matrix.appraisal }}
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
+ matrix:
41
+ include:
42
+ # Ruby 3.4
43
+ - ruby: "ruby"
44
+ appraisal: "current"
45
+ exec_cmd: "rake test"
46
+ gemfile: "Appraisal.root"
47
+ rubygems: latest
48
+ bundler: latest
49
+
50
+ # truffleruby-24.1
51
+ # (according to documentation: targets Ruby 3.3 compatibility)
52
+ # (according to runtime: targets Ruby 3.2 compatibility)
53
+ - ruby: "truffleruby"
54
+ appraisal: "current"
55
+ exec_cmd: "rake test"
56
+ gemfile: "Appraisal.root"
57
+ rubygems: default
58
+ bundler: default
59
+
60
+ # jruby-10.0 (targets Ruby 3.4 compatibility)
61
+ - ruby: "jruby"
62
+ appraisal: "current"
63
+ exec_cmd: "rake test"
64
+ gemfile: "Appraisal.root"
65
+ rubygems: default
66
+ bundler: default
67
+
68
+ steps:
69
+ - name: Checkout
70
+ uses: actions/checkout@v5
71
+
72
+ - name: Setup Ruby & RubyGems
73
+ uses: ruby/setup-ruby@v1
74
+ with:
75
+ ruby-version: ${{ matrix.ruby }}
76
+ rubygems: ${{ matrix.rubygems }}
77
+ bundler: ${{ matrix.bundler }}
78
+ bundler-cache: false
79
+
80
+ # Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
81
+ # We need to do this first to get appraisal installed.
82
+ # NOTE: This does not use the main Gemfile at all.
83
+ - name: Install Root Appraisal
84
+ run: bundle
85
+ - name: Appraisal for ${{ matrix.ruby }}@${{ matrix.appraisal }}
86
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle
87
+ - name: Tests for ${{ matrix.ruby }}@${{ matrix.appraisal }} via ${{ matrix.exec_cmd }}
88
+ run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
@@ -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@v5
19
+ - name: 'Dependency Review'
20
+ uses: actions/dependency-review-action@v4
@@ -0,0 +1,38 @@
1
+ name: Discord Notify
2
+
3
+ on:
4
+ check_run:
5
+ types: [completed]
6
+ discussion:
7
+ types: [ created ]
8
+ discussion_comment:
9
+ types: [ created ]
10
+ fork:
11
+ gollum:
12
+ issues:
13
+ types: [ opened ]
14
+ issue_comment:
15
+ types: [ created ]
16
+ pull_request:
17
+ types: [ opened, reopened, closed ]
18
+ release:
19
+ types: [ published ]
20
+ watch:
21
+ types: [ started ]
22
+
23
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
24
+ jobs:
25
+ # This workflow contains a single job called "build"
26
+ notify:
27
+ # The type of runner that the job will run on
28
+ runs-on: ubuntu-latest
29
+
30
+ # Steps represent a sequence of tasks that will be executed as part of the job
31
+ steps:
32
+ - name: Actions Status Discord
33
+ uses: sarisia/actions-status-discord@v1
34
+ if: always()
35
+ with:
36
+ webhook: ${{ secrets.DISCORD_WEBHOOK }}
37
+ status: ${{ job.status }}
38
+ username: GitHub Actions