Skip to content

Commit 2be56d2

Browse files
committed
πŸ› Handle newly parsed, but still insane, URIs
1 parent cacfc35 commit 2be56d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7813
-361
lines changed

β€Ž.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export K_SOUP_COV_DO=true # Means you want code coverage
1919
# Available formats are html, xml, rcov, lcov, json, tty
2020
export K_SOUP_COV_COMMAND_NAME="MiniTest Coverage"
2121
export K_SOUP_COV_FORMATTERS="html,tty"
22-
export K_SOUP_COV_MIN_BRANCH=86 # Means you want to enforce X% branch coverage
22+
export K_SOUP_COV_MIN_BRANCH=85 # Means you want to enforce X% branch coverage
2323
export K_SOUP_COV_MIN_LINE=91 # Means you want to enforce X% line coverage
2424
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
2525
export K_SOUP_COV_MULTI_FORMATTERS=true

β€Ž.github/workflows/coverage.yml

Lines changed: 56 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
name: Ruby - Coverage
1+
name: Test Coverage
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
id-token: write
27

38
env:
4-
K_SOUP_COV_MIN_BRANCH: 86
9+
K_SOUP_COV_MIN_BRANCH: 85
510
K_SOUP_COV_MIN_LINE: 91
611
K_SOUP_COV_MIN_HARD: true
12+
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty"
713
K_SOUP_COV_DO: true
8-
K_SOUP_COV_COMMAND_NAME: "MiniTest Coverage"
14+
K_SOUP_COV_MULTI_FORMATTERS: true
15+
K_SOUP_COV_COMMAND_NAME: "Test Coverage"
916

1017
on:
1118
push:
1219
branches:
1320
- 'main'
21+
- '*-stable'
1422
tags:
1523
- '!*' # Do not execute on tags
1624
pull_request:
@@ -19,32 +27,31 @@ on:
1927
# Allow manually triggering the workflow.
2028
workflow_dispatch:
2129

22-
permissions:
23-
contents: read
24-
2530
# Cancels all previous workflow runs for the same branch that have not yet completed.
2631
concurrency:
2732
# The concurrency group contains the workflow name and the branch name.
2833
group: "${{ github.workflow }}-${{ github.ref }}"
2934
cancel-in-progress: true
3035

3136
jobs:
32-
test:
33-
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
34-
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
35-
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
36-
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
37+
coverage:
38+
name: Code Coverage on ${{ matrix.ruby }}@current
39+
if: ${{!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')}}
3740
runs-on: ubuntu-latest
41+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
42+
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
43+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
3844
strategy:
45+
fail-fast: false
3946
matrix:
40-
rubygems:
41-
- latest
42-
bundler:
43-
- latest
44-
gemfile:
45-
- coverage
46-
ruby:
47-
- '3.1'
47+
include:
48+
# Coverage
49+
- ruby: "ruby"
50+
appraisal: "coverage"
51+
exec_cmd: "rake test"
52+
gemfile: "Appraisal.root"
53+
rubygems: latest
54+
bundler: latest
4855

4956
steps:
5057
- name: Checkout
@@ -56,14 +63,38 @@ jobs:
5663
ruby-version: "${{ matrix.ruby }}"
5764
rubygems: "${{ matrix.rubygems }}"
5865
bundler: "${{ matrix.bundler }}"
59-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
66+
bundler-cache: true
6067

61-
- name: Run tests
62-
run: bundle exec rake test
68+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
69+
# We need to do this first to get appraisal installed.
70+
# NOTE: This does not use the primary Gemfile at all.
71+
# - name: Install Root Appraisal
72+
# run: bundle
73+
- name: Appraisal for ${{ matrix.appraisal }}
74+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
75+
- name: Tests for ${{ matrix.ruby }}@current via ${{ matrix.exec_cmd }}
76+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
77+
78+
# Do SaaS coverage uploads first
79+
- name: Upload coverage to Coveralls
80+
if: ${{ !env.ACT }}
81+
uses: coverallsapp/github-action@master
82+
with:
83+
github-token: ${{ secrets.GITHUB_TOKEN }}
84+
continue-on-error: ${{ matrix.experimental != 'false' }}
85+
86+
- name: Upload coverage to QLTY
87+
if: ${{ !env.ACT }}
88+
uses: qltysh/qlty-action/coverage@main
89+
with:
90+
token: ${{secrets.QLTY_COVERAGE_TOKEN}}
91+
files: coverage/.resultset.json
92+
continue-on-error: ${{ matrix.experimental != 'false' }}
6393

94+
# Then PR comments
6495
- name: Code Coverage Summary Report
96+
if: ${{ !env.ACT && github.event_name == 'pull_request' }}
6597
uses: irongut/[email protected]
66-
if: ${{ github.event_name == 'pull_request' }}
6798
with:
6899
filename: ./coverage/coverage.xml
69100
badge: true
@@ -73,12 +104,12 @@ jobs:
73104
hide_complexity: true
74105
indicators: true
75106
output: both
76-
thresholds: '91 86'
107+
thresholds: '91 85'
77108
continue-on-error: ${{ matrix.experimental != 'false' }}
78109

79110
- name: Add Coverage PR Comment
80111
uses: marocchino/sticky-pull-request-comment@v2
81-
if: ${{ github.event_name == 'pull_request' }}
112+
if: ${{ !env.ACT && github.event_name == 'pull_request' }}
82113
with:
83114
recreate: true
84115
path: code-coverage-results.md

β€Ž.idea/.gitignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

β€Ž.idea/git_toolbox_prj.xml

Lines changed: 0 additions & 15 deletions
This file was deleted.

β€Ž.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

β€Ž.idea/shelf/Uncommitted_changes_before_rebase_[Changes]/shelved.patch

Lines changed: 0 additions & 111 deletions
This file was deleted.

β€Ž.idea/shelf/Uncommitted_changes_before_rebase__Changes_.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
Β (0)