Repository navigation
83 lines (73 loc) · 2.83 KB
/
Copy pathmain.yml
File metadata and controls
83 lines (73 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Ruby
# This repo's CI covers the v1 gems (the still-published Thor runtime). The v2
# server library (v2/ruby) is validated cross-language in terminalwire/protocol's
# interop matrix (it holds the conformance corpus): `make test` / `make conformance`.
#
# NOTE: the old Tebako packaging job was removed — Tebako is no longer how the
# client ships (the client is the Go binary in terminalwire/cli).
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} (v1 gems)
strategy:
matrix:
ruby:
- '3.3.0'
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: false
- name: Install dependencies
run: bundle install --jobs 4 --retry 3 --verbose
# The fullstack specs (spec/fullstack) build a Docker image that COPYs the built
# gem packages (gem/*/pkg/*.gem), so build them first or the COPY glob is empty
# and `docker build` fails.
- name: Build v1 gem packages
run: bundle exec rake gem:build
- name: Run RSpec
run: bundle exec rspec --format documentation
# Advisory only (never fails the build): surface high-complexity methods in the
# v2 lib so a module doesn't quietly turn gnarly. A high flog score isn't
# automatically wrong — it's a "give this a look" signal, posted to the summary.
- name: Method complexity — v2 lib (flog, advisory)
if: always()
continue-on-error: true
run: |
gem install flog --no-document
{
echo "### Ruby method complexity — v2/ruby/lib (flog, advisory)"
echo '```'
flog -g v2/ruby/lib | head -30
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
v2-lib:
runs-on: ubuntu-latest
name: v2 gem (terminalwire) unit specs
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.0'
bundler-cache: false
# The v2 gem's own RSpec suite: the sans-IO protocol core (codec/frames/
# negotiator/window) + the conformance runner over a local seed corpus
# (spec/corpus/vectors), PLUS the server-runtime specs (spec/server: handler URL
# host, Rails session, connection profile / header allowlist, the baked
# management grant, system-bin lockdown). The async stack stays lazy (loaded only
# on the Falcon path), so it never loads here. The full cross-impl corpus runs in
# terminalwire/protocol's interop matrix (set TERMINALWIRE_CORPUS to point here).
- name: Install v2 gem dependencies
working-directory: v2/ruby
run: bundle install --jobs 4 --retry 3
- name: Run v2 RSpec
working-directory: v2/ruby
run: bundle exec rspec --format documentation